Skip to content

Commit 133809b

Browse files
srvasudejburnim
authored andcommitted
Restrict range of ndtri_test since numpy is less accurate near the tails.
PiperOrigin-RevId: 547637478
1 parent 6504bc5 commit 133809b

File tree

1 file changed

+2
-1
lines changed
  • tensorflow_probability/python/internal/backend/numpy

1 file changed

+2
-1
lines changed

tensorflow_probability/python/internal/backend/numpy/numpy_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1305,7 +1305,8 @@ def _not_implemented(*args, **kwargs):
13051305
xla_atol=1e-4, xla_rtol=1e-4),
13061306
TestCase('math.logical_not',
13071307
[single_arrays(dtype=np.bool_, elements=hps.booleans())]),
1308-
TestCase('math.ndtri', [single_arrays(elements=floats(0., 1.))]),
1308+
TestCase('math.ndtri', [single_arrays(elements=floats(1e-7, 1. - 1e-7))],
1309+
xla_atol=1e-4, xla_rtol=4e-3),
13091310
TestCase('math.negative', [single_arrays()]),
13101311
TestCase('math.reciprocal', [single_arrays()]),
13111312
TestCase('math.rint', [single_arrays()]),

0 commit comments

Comments
 (0)