diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-09-08 20:55:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-08 20:55:08 -0700 |
commit | 42ac121a0b547bc7c218c7ea318caf6c0a420034 (patch) | |
tree | b955cb46d1122ca128ac0c6f78b971c7e0468500 /numpy | |
parent | f182f5967fa620faa3301e161cc584c7e3d4e64a (diff) | |
parent | 8904fd71c8851cb74ddf02c14a13bcd1278c303b (diff) | |
download | numpy-42ac121a0b547bc7c218c7ea318caf6c0a420034.tar.gz |
Merge pull request #14458 from ahaldane/fix_hypergeometric_long
BUG: random.hypergeometic assumes npy_long is npy_int64, hangs ppc64
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/random/mtrand.pyx | 6 |
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: |