@@ -427,7 +427,7 @@ def __contains__(self, item: object) -> bool | np.bool_:
427427 if not self ._can_hold_na :
428428 return False
429429 elif item is self .dtype .na_value or isinstance (item , self .dtype .type ):
430- return self ._hasnans
430+ return self ._hasna
431431 else :
432432 return False
433433 else :
@@ -606,7 +606,7 @@ def isna(self) -> np.ndarray | ExtensionArraySupportsAnyAll:
606606 raise AbstractMethodError (self )
607607
608608 @property
609- def _hasnans (self ) -> bool :
609+ def _hasna (self ) -> bool :
610610 # GH#22680
611611 """
612612 Equivalent to `self.isna().any()`.
@@ -698,7 +698,7 @@ def argmin(self, skipna: bool = True) -> int:
698698 ExtensionArray.argmax
699699 """
700700 validate_bool_kwarg (skipna , "skipna" )
701- if not skipna and self ._hasnans :
701+ if not skipna and self ._hasna :
702702 raise NotImplementedError
703703 return nargminmax (self , "argmin" )
704704
@@ -722,7 +722,7 @@ def argmax(self, skipna: bool = True) -> int:
722722 ExtensionArray.argmin
723723 """
724724 validate_bool_kwarg (skipna , "skipna" )
725- if not skipna and self ._hasnans :
725+ if not skipna and self ._hasna :
726726 raise NotImplementedError
727727 return nargminmax (self , "argmax" )
728728
@@ -1534,6 +1534,9 @@ def _empty(cls, shape: Shape, dtype: ExtensionDtype):
15341534 ExtensionDtype.empty
15351535 ExtensionDtype.empty is the 'official' public version of this API.
15361536 """
1537+ # Implementer note: while ExtensionDtype.empty is the public way to
1538+ # call this method, it is still required to implement this `_empty`
1539+ # method as well (it is called internally in pandas)
15371540 obj = cls ._from_sequence ([], dtype = dtype )
15381541
15391542 taker = np .broadcast_to (np .intp (- 1 ), shape )
0 commit comments