We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c15d95 commit 6415812Copy full SHA for 6415812
pandas/core/common.py
@@ -425,6 +425,8 @@ def random_state(state=None):
425
or (not np_version_under1p18 and isinstance(state, np.random.BitGenerator))
426
):
427
return np.random.RandomState(state)
428
+ elif not np_version_under1p18 and isinstance(state, np.random.Generator):
429
+ return np.random.RandomState(state.bit_generator)
430
elif isinstance(state, np.random.RandomState):
431
return state
432
elif state is None:
0 commit comments