We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13b8574 commit b62615bCopy full SHA for b62615b
tests/pyadjoint/test_floats.py
@@ -1,5 +1,6 @@
1
import pytest
2
import math
3
+import numpy as np
4
from numpy.testing import assert_approx_equal
5
from numpy.random import rand
6
from pyadjoint import *
@@ -155,7 +156,8 @@ def test_float_neg():
155
156
assert rf2.derivative() == - 2.0
157
158
-def test_float_logexp():
159
+@pytest.mark.parametrize("exp", (exp, lambda x: 1 + np.expm1(x)))
160
+def test_float_logexp(exp):
161
a = AdjFloat(3.0)
162
b = exp(a)
163
c = log(b)
0 commit comments