File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1515
1616if TYPE_CHECKING :
1717 from pandas ._typing import (
18- ArrayLike ,
1918 npt ,
2019 )
2120
21+ from pandas .core .arrays .base import ExtensionArray
22+
2223
2324def to_numpy_dtype_inference (
24- arr : ArrayLike , dtype : npt .DTypeLike | None , na_value , hasna : bool
25+ arr : ExtensionArray , dtype : npt .DTypeLike | None , na_value , hasna : bool
2526) -> tuple [np .dtype | None , Any ]:
2627 result_dtype : np .dtype | None
2728 inferred_numeric_dtype = False
@@ -34,11 +35,11 @@ def to_numpy_dtype_inference(
3435 if arr .dtype .kind in "iu" :
3536 result_dtype = np .dtype (np .float64 )
3637 else :
37- result_dtype = arr .dtype .numpy_dtype # type: ignore[union- attr]
38+ result_dtype = arr .dtype .numpy_dtype # type: ignore[attr-defined ]
3839 if na_value is lib .no_default :
3940 na_value = np .nan
4041 else :
41- result_dtype = arr .dtype .numpy_dtype # type: ignore[union- attr]
42+ result_dtype = arr .dtype .numpy_dtype # type: ignore[attr-defined ]
4243 elif dtype is not None :
4344 result_dtype = np .dtype (dtype )
4445 else :
You can’t perform that action at this time.
0 commit comments