Skip to content

Commit c5bfdf8

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent a7604c9 commit c5bfdf8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pandas/core/dtypes/dtypes.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,15 +2287,18 @@ def numpy_dtype(self) -> np.dtype:
22872287
return np.dtype(str)
22882288
try:
22892289
np_dtype = self.pyarrow_dtype.to_pandas_dtype()
2290-
2290+
22912291
if isinstance(np_dtype, object):
22922292
from pandas.core.indexes.interval import IntervalIndex
2293-
if hasattr(np_dtype, "categories") and isinstance(np_dtype.categories, IntervalIndex):
2293+
2294+
if hasattr(np_dtype, "categories") and isinstance(
2295+
np_dtype.categories, IntervalIndex
2296+
):
22942297
return np.dtype(object)
2295-
2298+
22962299
if isinstance(np_dtype, DatetimeTZDtype):
22972300
return np.dtype(f"datetime64[{np_dtype.unit}]")
2298-
2301+
22992302
return np.dtype(np_dtype)
23002303
except (NotImplementedError, TypeError):
23012304
return np.dtype(object)

0 commit comments

Comments
 (0)