8000 MAINT: Avoid overflow in comparison with int64 on shorter platforms · numpy/numpy@15421fd · GitHub
[go: up one dir, main page]

Skip to content

Commit 15421fd

Browse files
committed
MAINT: Avoid overflow in comparison with int64 on shorter platforms
Maybe not the best way, but its functional and easy to grok and I doubt it matters speed wise.
1 parent afd0b30 commit 15421fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/random/_generator.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4229,7 +4229,7 @@ cdef class Generator:
42294229
elif colors.size > 0 and< 61CB /span> not np.issubdtype(colors.dtype,
42304230
np.integer):
42314231
invalid_colors = True
4232-
elif np.any((colors < 0) | (colors > INT64_MAX)):
4232+
elif np.any((colors < 0) | (colors > np.int64(INT64_MAX))):
42334233
invalid_colors = True
42344234
except ValueError:
42354235
invalid_colors = True

0 commit comments

Comments
 (0)
0