File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -808,11 +808,11 @@ def assert_extension_array_equal(
808
808
# Specifically for StringArrayNumpySemantics, validate here we have a valid array
809
809
if isinstance (left .dtype , StringDtype ) and left .dtype .storage == "python_numpy" :
810
810
assert np .all (
811
- [np .isnan (val ) for val in left ._ndarray [left_na ]]
811
+ [np .isnan (val ) for val in left ._ndarray [left_na ]] # type: ignore[attr-defined]
812
812
), "wrong missing value sentinels"
813
813
if isinstance (right .dtype , StringDtype ) and right .dtype .storage == "python_numpy" :
814
814
assert np .all (
815
- [np .isnan (val ) for val in right ._ndarray [right_na ]]
815
+ [np .isnan (val ) for val in right ._ndarray [right_na ]] # type: ignore[attr-defined]
816
816
), "wrong missing value sentinels"
817
817
818
818
left_valid = left [~ left_na ].to_numpy (dtype = object )
Original file line number Diff line number Diff line change @@ -718,7 +718,7 @@ def _from_sequence(
718
718
dtype = StringDtype (storage = "python_numpy" )
719
719
return super ()._from_sequence (scalars , dtype = dtype , copy = copy )
720
720
721
- def _from_backing_data (self , arr : np .ndarray ) -> NumpyExtensionArray :
721
+ def _from_backing_data (self , arr : np .ndarray ) -> StringArrayNumpySemantics :
722
722
# need to overrde NumpyExtensionArray._from_backing_data to ensure
723
723
# we always preserve the dtype
724
724
return NDArrayBacked ._from_backing_data (self , arr )
You can’t perform that action at this time.
0 commit comments