summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Haldane <allan.haldane@gmail.com>2019-09-09 01:44:09 +0000
committerAllan Haldane <allan.haldane@gmail.com>2019-09-09 01:47:14 +0000
commit8904fd71c8851cb74ddf02c14a13bcd1278c303b (patch)
tree9a5d4a3baccc5afef1d5da5413185ef4c82d1e6d
parentf786041db9697f58b087e18198561db8b28235c4 (diff)
downloadnumpy-8904fd71c8851cb74ddf02c14a13bcd1278c303b.tar.gz
BUG: random.hypergeometic assumes npy_long is npy_int64, hung ppc64
Fixes #14457
-rw-r--r--numpy/random/mtrand.pyx6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/random/mtrand.pyx b/numpy/random/mtrand.pyx
index bd23ab957..55069097b 100644
--- a/numpy/random/mtrand.pyx
+++ b/numpy/random/mtrand.pyx
@@ -3493,9 +3493,9 @@ cdef class RandomState:
cdef int64_t lngood, lnbad, lnsample
# This cast to long is required to ensure that the values are inbounds
- ongood = <np.ndarray>np.PyArray_FROM_OTF(ngood, np.NPY_LONG, np.NPY_ALIGNED)
- onbad = <np.ndarray>np.PyArray_FROM_OTF(nbad, np.NPY_LONG, np.NPY_ALIGNED)
- onsample = <np.ndarray>np.PyArray_FROM_OTF(nsample, np.NPY_LONG, np.NPY_ALIGNED)
+ ongood = <np.ndarray>np.PyArray_FROM_OTF(ngood, np.NPY_INT64, np.NPY_ALIGNED)
+ onbad = <np.ndarray>np.PyArray_FROM_OTF(nbad, np.NPY_INT64, np.NPY_ALIGNED)
+ onsample = <np.ndarray>np.PyArray_FROM_OTF(nsample, np.NPY_INT64, np.NPY_ALIGNED)
if np.PyArray_NDIM(ongood) == np.PyArray_NDIM(onbad) == np.PyArray_NDIM(onsample) == 0: