You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: import pandas as pd
In [2]: import numpy as np
In [3]: state_data = np.random.randint(0, 2**31, size=624, dtype='uint32')
In [4]: pd.core.common.random_state(state_data)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-4f97e41a5899> in <module>
----> 1 pd.core.common.random_state(state_data)
~/sandbox/pandas/pandas/core/common.py in random_state(state)
415else:
416raiseValueError(
--> 417 "random_state must be an integer, a numpy RandomState, or None"
418 )
419ValueError: random_state must be an integer, a numpy RandomState, or None
Expected Output
Out[4]: RandomState(MT19937) at0x115B16050
The text was updated successfully, but these errors were encountered:
The numpy RandomState seed can be an int, array-like, or BitGenerator
Right now, we only pass through integers. Arrays (and BitGenerators if possible) should be passed through to RandomState at
pandas/pandas/core/common.py
Lines 409 to 410 in 54c5e9e
Current Behavior
Expected Output
The text was updated successfully, but these errors were encountered: