We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73d7e4a commit 0631205Copy full SHA for 0631205
1 file changed
mkl_random/tests/test_random.py
@@ -224,7 +224,7 @@ class RandIntData(NamedTuple):
224
def randint():
225
rfunc_method = rnd.randint
226
integral_dtypes = [
227
- np.bool_,
+ np.bool,
228
np.int8,
229
np.uint8,
230
np.int16,
@@ -323,8 +323,9 @@ def test_randint_respect_dtype_singleton(randint):
323
assert_equal(sample.dtype, np.dtype(dt))
324
325
for dt in (bool, int):
326
- lbnd = 0 if dt is bool else np.iinfo(np.dtype(dt)).min
327
- ubnd = 2 if dt is bool else np.iinfo(np.dtype(dt)).max + 1
+ # The legacy rng uses "long" as the default integer:
+ lbnd = 0 if dt is bool else np.iinfo("long").min
328
+ ubnd = 2 if dt is bool else np.iinfo("long").max + 1
329
330
# gh-7284: Ensure that we get Python data types
331
sample = randint.rfunc(lbnd, ubnd, dtype=dt)
0 commit comments