File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -71,10 +71,10 @@ previous behavior remains unchanged.
71
71
Parameters
72
72
----------
73
73
seed : {None, int, array_like}, optional
74
- Random seed initializing the pseudo-random number generator.
75
- Can be an integer, an array (or other sequence) of integers of
76
- any length , or ``None`` (the default).
77
- If `seed` is `` None``, then `` RandomState` ` will try to read data from
74
+ Random seed used to initialize the pseudo-random number generator. Can
75
+ be any integer between 0 and 2**32 - 1 inclusive , an array (or other
76
+ sequence) of such integers , or ``None`` (the default). If `seed` is
77
+ `` None``, then `RandomState` will try to read data from
78
78
``/dev/urandom`` (or the Windows analog) if available or seed from
79
79
the clock otherwise.
80
80
@@ -85,4 +85,4 @@ pseudo-random number generator with a number of methods that are similar
85
85
to the ones available in ``RandomState``. ``RandomState``, besides being
86
86
NumPy-aware, has the advantage that it provides a much larger number
87
87
of probability distributions to choose from.
88
- """
88
+ """
Original file line number Diff line number Diff line change @@ -226,13 +226,13 @@ cdef class RandomState:
226
226
else :
227
227
idx = operator .index (seed )
228
228
if idx > int (2 ** 32 - 1 ) or idx < 0 :
229
- raise ValueError ("Seed must be between 0 and 4294967295 " )
229
+ raise ValueError ("Seed must be between 0 and 2**32 - 1 " )
230
230
with self .lock :
231
231
set_seed (& self .rng_state , seed )
232
232
except TypeError :
233
233
obj = np .asarray (seed ).astype (np .int64 , casting = 'safe' )
234
234
if ((obj > int (2 ** 32 - 1 )) | (obj < 0 )).any ():
235
- raise ValueError ("Seed must be between 0 and 4294967295 " )
235
+ raise ValueError ("Seed must be between 0 and 2**32 - 1 " )
236
236
obj = obj .astype (np .uint32 , casting = 'unsafe' , order = 'C' )
237
237
with self .lock :
238
238
set_seed_by_array (& self .rng_state ,
You can’t perform that action at this time.
0 commit comments