summaryrefslogtreecommitdiff
path: root/numpy/random/mtrand/numpy.pxd
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-05-05 19:13:28 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-05-15 02:13:34 +0200
commit6b1a1205eac6fe5d162f16155d500765e8bca53c (patch)
tree60944a074113cf726a9d114542cdbea31054c8cb /numpy/random/mtrand/numpy.pxd
parentcd0d0579614481076fef473f1fc0c4b13f991b28 (diff)
downloadnumpy-6b1a1205eac6fe5d162f16155d500765e8bca53c.tar.gz
BUG: reject too large seeds to RandomState
mtrand accepts seeds larger than 32 bit but silently truncates them back to 32 bit. This can lead to accidentally getting the same random stream for two different seeds, e.g. 1 and 1 + 2**40.
Diffstat (limited to 'numpy/random/mtrand/numpy.pxd')
-rw-r--r--numpy/random/mtrand/numpy.pxd2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/random/mtrand/numpy.pxd b/numpy/random/mtrand/numpy.pxd
index 6812cc164..c54f79c0a 100644
--- a/numpy/random/mtrand/numpy.pxd
+++ b/numpy/random/mtrand/numpy.pxd
@@ -121,6 +121,8 @@ cdef extern from "numpy/arrayobject.h":
object PyArray_IterNew(object arr)
void PyArray_ITER_NEXT(flatiter it) nogil
+ dtype PyArray_DescrFromType(int)
+
void import_array()
# include functions that were once macros in the new api