File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1687,7 +1687,7 @@ cdef class RandomState:
16871687 ret = randfunc (low , high - 1 , size )
16881688
16891689 if size is None :
1690- if dtype in (bool , int , np .compat . long ):
1690+ if dtype in (bool , int , np .long ):
16911691 return dtype (ret )
16921692
16931693 return ret
@@ -1893,7 +1893,7 @@ cdef class RandomState:
18931893 """
18941894
18951895 # Format and Verify input
1896- a = np .array ( a , copy = False )
1896+ a = np .asarray ( a )
18971897 if a .ndim == 0 :
18981898 try :
18991899 # __index__ must return an integer by python rules.
@@ -1942,7 +1942,7 @@ cdef class RandomState:
19421942 cdf /= cdf [- 1 ]
19431943 uniform_samples = self .random_sample (shape )
19441944 idx = cdf .searchsorted (uniform_samples , side = 'right' )
1945- idx = np .array (idx , copy = False ) # searchsorted returns a scalar
1945+ idx = np .asarray (idx ) # searchsorted returns a scalar
19461946 else :
19471947 idx = self .randint (0 , pop_size , size = shape )
19481948 else :
You can’t perform that action at this time.
0 commit comments