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(
808808 # Specifically for StringArrayNumpySemantics, validate here we have a valid array
809809 if isinstance (left .dtype , StringDtype ) and left .dtype .storage == "python_numpy" :
810810 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]
812812 ), "wrong missing value sentinels"
813813 if isinstance (right .dtype , StringDtype ) and right .dtype .storage == "python_numpy" :
814814 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]
816816 ), "wrong missing value sentinels"
817817
818818 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(
718718 dtype = StringDtype (storage = "python_numpy" )
719719 return super ()._from_sequence (scalars , dtype = dtype , copy = copy )
720720
721- def _from_backing_data (self , arr : np .ndarray ) -> NumpyExtensionArray :
721+ def _from_backing_data (self , arr : np .ndarray ) -> StringArrayNumpySemantics :
722722 # need to overrde NumpyExtensionArray._from_backing_data to ensure
723723 # we always preserve the dtype
724724 return NDArrayBacked ._from_backing_data (self , arr )
You can’t perform that action at this time.
0 commit comments