File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ Changelog
452
452
:user: `Jérémie du Boisberranger <jeremiedbb> `.
453
453
454
454
- |FIX | Fixes :func: `utils.validation.check_array ` to properly convert pandas
455
- extension arrays. :pr: `25813 ` by `Thomas Fan `_.
455
+ extension arrays. :pr: `25813 ` :pr: ` xxxxx ` by `Thomas Fan `_.
456
456
457
457
- |Fix | :func: `utils.validation.check_array ` now suports pandas DataFrames with
458
458
extension arrays and object dtypes by return an ndarray with object dtype.
Original file line number Diff line number Diff line change @@ -628,12 +628,8 @@ def _pandas_dtype_needs_early_conversion(pd_dtype):
628
628
629
629
630
630
def _is_extension_array_dtype (array ):
631
- try :
632
- from pandas .api .types import is_extension_array_dtype
633
-
634
- return is_extension_array_dtype (array )
635
- except ImportError :
636
- return False
631
+ # Pandas extension arrays have a dtype with an na_value
632
+ return hasattr (array , "dtype" ) and hasattr (array .dtype , "na_value" )
637
633
638
634
639
635
def check_array (
You can’t perform that action at this time.
0 commit comments