Skip to content

CI: Numpy compat #34321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from pandas._libs import lib, tslibs
from pandas._typing import AnyArrayLike, Scalar, T
from pandas.compat.numpy import _np_version_under1p17
from pandas.compat.numpy import _np_version_under1p18

from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike
from pandas.core.dtypes.common import (
Expand Down Expand Up @@ -396,7 +396,7 @@ def random_state(state=None):

..versionchanged:: 1.1.0

array-like and BitGenerator (for NumPy>=1.17) object now passed to
array-like and BitGenerator (for NumPy>=1.18) object now passed to
np.random.RandomState() as seed

Default None.
Expand All @@ -409,7 +409,7 @@ def random_state(state=None):
if (
is_integer(state)
or is_array_like(state)
or (not _np_version_under1p17 and isinstance(state, np.random.BitGenerator))
or (not _np_version_under1p18 and isinstance(state, np.random.BitGenerator))
):
return np.random.RandomState(state)
elif isinstance(state, np.random.RandomState):
Expand Down