Skip to content

Commit

Permalink
Merge pull request #16419 from rapidsai/branch-24.08
Browse files Browse the repository at this point in the history
Forward-merge branch-24.08 into branch-24.10
  • Loading branch information
GPUtester authored Jul 29, 2024
2 parents 24997fd + a51964e commit eed0b1f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/cudf/cudf/core/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@
from pandas.core.arrays.arrow.extension_types import ArrowIntervalType

import cudf
from cudf.core._compat import PANDAS_LT_300
from cudf.core._compat import PANDAS_GE_210, PANDAS_LT_300
from cudf.core.abc import Serializable
from cudf.utils.docutils import doc_apply

if PANDAS_GE_210:
PANDAS_NUMPY_DTYPE = pd.core.dtypes.dtypes.NumpyEADtype
else:
PANDAS_NUMPY_DTYPE = pd.core.dtypes.dtypes.PandasDtype

if TYPE_CHECKING:
from cudf._typing import Dtype
from cudf.core.buffer import Buffer
Expand Down Expand Up @@ -72,7 +77,7 @@ def dtype(arbitrary):
return np.dtype("object")
else:
return dtype(pd_dtype.numpy_dtype)
elif isinstance(pd_dtype, pd.core.dtypes.dtypes.NumpyEADtype):
elif isinstance(pd_dtype, PANDAS_NUMPY_DTYPE):
return dtype(pd_dtype.numpy_dtype)
elif isinstance(pd_dtype, pd.CategoricalDtype):
return cudf.CategoricalDtype.from_pandas(pd_dtype)
Expand Down

0 comments on commit eed0b1f

Please sign in to comment.