|
3 | 3 |
|
4 | 4 | import pytensor
|
5 | 5 | import pytensor.tensor as pt
|
6 |
| -import tests.unittest_tools as utt |
7 | 6 | from pytensor.compile.mode import Mode
|
8 | 7 | from pytensor.graph.fg import FunctionGraph
|
9 | 8 | from pytensor.link.c.basic import DualLinker
|
@@ -477,11 +476,11 @@ def test_grad_inrange():
|
477 | 476 | # x is equal to the lower or higher bound but in that case
|
478 | 477 | # PyTensor defines the gradient to be zero for stability.
|
479 | 478 | f = pytensor.function([x, low, high], [gx, glow, ghigh])
|
480 |
| - utt.assert_allclose(f(0, 1, 5), [0, 0, 0]) |
481 |
| - utt.assert_allclose(f(1, 1, 5), [0, 0, 0]) |
482 |
| - utt.assert_allclose(f(2, 1, 5), [0, 0, 0]) |
483 |
| - utt.assert_allclose(f(5, 1, 5), [0, 0, 0]) |
484 |
| - utt.assert_allclose(f(7, 1, 5), [0, 0, 0]) |
| 479 | + np.testing.assert_allclose(f(0, 1, 5), [0, 0, 0]) |
| 480 | + np.testing.assert_allclose(f(1, 1, 5), [0, 0, 0]) |
| 481 | + np.testing.assert_allclose(f(2, 1, 5), [0, 0, 0]) |
| 482 | + np.testing.assert_allclose(f(5, 1, 5), [0, 0, 0]) |
| 483 | + np.testing.assert_allclose(f(7, 1, 5), [0, 0, 0]) |
485 | 484 |
|
486 | 485 |
|
487 | 486 | def test_grad_abs():
|
|
0 commit comments