Skip to content

Commit 98f02a9

Browse files
MAINT: random: Cast LONG_MAX to double in _common.pyx to avoid compiler warning
1 parent 25db225 commit 98f02a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/random/_common.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ cdef int check_constraint(double val, object name, constraint_type cons) except
467467
# Note: Assume value is integral (double of LONG_MAX should work out)
468468
if val < 0:
469469
raise ValueError(name + " < 0")
470-
elif val > LONG_MAX:
470+
elif val > <double> LONG_MAX:
471471
raise ValueError(
472472
name + " is out of bounds for long, consider using "
473473
"the new generator API for 64bit integers.")

0 commit comments

Comments
 (0)