summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-01-17 09:55:11 -0700
committerGitHub <noreply@github.com>2017-01-17 09:55:11 -0700
commit5223d433b3a867ea81037c7e585f182476af7619 (patch)
treeab58adb47bfa6b90c8c83118136850df4cce3aa5 /numpy
parent52ff75bcf1085a34e9d86db3040944615c04e3d2 (diff)
parent93c4cd4baf01d405a23116311a8fe548e9893bc7 (diff)
downloadnumpy-5223d433b3a867ea81037c7e585f182476af7619.tar.gz
Merge pull request #8491 from juliantaylor/i386-finite
TST: work around isfinite inconsistency on i386
Diffstat (limited to 'numpy')
-rw-r--r--numpy/random/tests/test_random.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 3589f4c36..dc7d18933 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -819,7 +819,9 @@ class TestRandomDist(TestCase):
assert_raises(OverflowError, func, [0], [np.inf])
# (fmax / 1e17) - fmin is within range, so this should not throw
- np.random.uniform(low=fmin, high=fmax / 1e17)
+ # account for i386 extended precision DBL_MAX / 1e17 + DBL_MAX >
+ # DBL_MAX by increasing fmin a bit
+ np.random.uniform(low=np.nextafter(fmin, 1), high=fmax / 1e17)
def test_vonmises(self):
np.random.seed(self.seed)