diff options
Diffstat (limited to 'numpy/random/tests/test_smoke.py')
-rw-r--r-- | numpy/random/tests/test_smoke.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/numpy/random/tests/test_smoke.py b/numpy/random/tests/test_smoke.py index 6e641b5f4..ebfc6825e 100644 --- a/numpy/random/tests/test_smoke.py +++ b/numpy/random/tests/test_smoke.py @@ -1,5 +1,4 @@ import pickle -import time from functools import partial import numpy as np @@ -8,7 +7,7 @@ from numpy.testing import assert_equal, assert_, assert_array_equal from numpy.random import (Generator, MT19937, PCG64, Philox, SFC64) @pytest.fixture(scope='module', - params=(np.bool, np.int8, np.int16, np.int32, np.int64, + params=(np.bool_, np.int8, np.int16, np.int32, np.int64, np.uint8, np.uint16, np.uint32, np.uint64)) def dtype(request): return request.param @@ -92,7 +91,7 @@ def warmup(rg, n=None): rg.random(n, dtype=np.float32) -class RNG(object): +class RNG: @classmethod def setup_class(cls): # Overridden in test classes. Place holder to silence IDE noise @@ -655,7 +654,7 @@ class RNG(object): rg.standard_gamma(1.0, out=existing[::3]) def test_integers_broadcast(self, dtype): - if dtype == np.bool: + if dtype == np.bool_: upper = 2 lower = 0 else: @@ -672,7 +671,7 @@ class RNG(object): assert_equal(a, c) self._reset_state() d = self.rg.integers(np.array( - [lower] * 10), np.array([upper], dtype=np.object), size=10, + [lower] * 10), np.array([upper], dtype=object), size=10, dtype=dtype) assert_equal(a, d) self._reset_state() @@ -701,7 +700,7 @@ class RNG(object): assert out.shape == (1,) def test_integers_broadcast_errors(self, dtype): - if dtype == np.bool: + if dtype == np.bool_: upper = 2 lower = 0 else: |