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.
7171Parameters
7272----------
7373seed : {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
7878 ``/dev/urandom`` (or the Windows analog) if available or seed from
7979 the clock otherwise.
8080
@@ -85,4 +85,4 @@ pseudo-random number generator with a number of methods that are similar
8585to the ones available in ``RandomState``. ``RandomState``, besides being
8686NumPy-aware, has the advantage that it provides a much larger number
8787of probability distributions to choose from.
88- """
88+ """
Original file line number Diff line number Diff line change @@ -226,13 +226,13 @@ cdef class RandomState:
226226 else :
227227 idx = operator .index (seed )
228228 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 " )
230230 with self .lock :
231231 set_seed (& self .rng_state , seed )
232232 except TypeError :
233233 obj = np .asarray (seed ).astype (np .int64 , casting = 'safe' )
234234 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 " )
236236 obj = obj .astype (np .uint32 , casting = 'unsafe' , order = 'C' )
237237 with self .lock :
238238 set_seed_by_array (& self .rng_state ,
You can’t perform that action at this time.
0 commit comments