Skip to content

Commit 73d7e4a

Browse files
committed
fix randint types used after validation
1 parent d317543 commit 73d7e4a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mkl_random/mklrand.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,17 +2189,17 @@ cdef class _MKLRandomState:
21892189

21902190
if size is not None:
21912191
if (np.prod(size) == 0):
2192-
return np.empty(size, dtype=np.dtype(dtype))
2192+
return np.empty(size, dtype=np.dtype(_dtype))
21932193

2194-
lowbnd, highbnd, randfunc = self._choose_randint_type(dtype)
2194+
lowbnd, highbnd, randfunc = self._choose_randint_type(_dtype)
21952195

21962196
if low < lowbnd:
21972197
raise ValueError(
2198-
f"low is out of bounds for {np.dtype(dtype).name}"
2198+
f"low is out of bounds for {np.dtype(_dtype).name}"
21992199
)
22002200
if high > highbnd:
22012201
raise ValueError(
2202-
f"high is out of bounds for {np.dtype(dtype).name}"
2202+
f"high is out of bounds for {np.dtype(_dtype).name}"
22032203
)
22042204
if low >= high:
22052205
raise ValueError("low >= high")

0 commit comments

Comments
 (0)