@@ -181,7 +181,6 @@ def _from_factorized(cls, values, original):
181181 # ------------------------------------------------------------------------
182182
183183 def __getitem__ (self , item ):
184- # type (Any) -> Any
185184 """
186185 Select a subset of self.
187186
@@ -213,7 +212,6 @@ def __getitem__(self, item):
213212 raise AbstractMethodError (self )
214213
215214 def __setitem__ (self , key , value ):
216- # type: (Union[int, np.ndarray], Any) -> None
217215 """
218216 Set one or more values inplace.
219217
@@ -261,7 +259,6 @@ def __setitem__(self, key, value):
261259 )
262260
263261 def __len__ (self ):
264- # type: () -> int
265262 """
266263 Length of this array
267264
@@ -286,31 +283,27 @@ def __iter__(self):
286283 # ------------------------------------------------------------------------
287284 @property
288285 def dtype (self ):
289- # type: () -> ExtensionDtype
290286 """
291287 An instance of 'ExtensionDtype'.
292288 """
293289 raise AbstractMethodError (self )
294290
295291 @property
296292 def shape (self ):
297- # type: () -> Tuple[int, ...]
298293 """
299294 Return a tuple of the array dimensions.
300295 """
301296 return (len (self ),)
302297
303298 @property
304299 def ndim (self ):
305- # type: () -> int
306300 """
307301 Extension Arrays are only allowed to be 1-dimensional.
308302 """
309303 return 1
310304
311305 @property
312306 def nbytes (self ):
313- # type: () -> int
314307 """
315308 The number of bytes needed to store this object in memory.
316309 """
@@ -342,7 +335,6 @@ def astype(self, dtype, copy=True):
342335 return np .array (self , dtype = dtype , copy = copy )
343336
344337 def isna (self ):
345- # type: () -> Union[ExtensionArray, np.ndarray]
346338 """
347339 A 1-D array indicating if each value is missing.
348340
@@ -365,7 +357,6 @@ def isna(self):
365357 raise AbstractMethodError (self )
366358
367359 def _values_for_argsort (self ):
368- # type: () -> ndarray
369360 """
370361 Return values for sorting.
371362
@@ -597,7 +588,6 @@ def searchsorted(self, value, side="left", sorter=None):
597588 return arr .searchsorted (value , side = side , sorter = sorter )
598589
599590 def _values_for_factorize (self ):
600- # type: () -> Tuple[ndarray, Any]
601591 """
602592 Return an array and missing value suitable for factorization.
603593
@@ -622,7 +612,6 @@ def _values_for_factorize(self):
622612 return self .astype (object ), np .nan
623613
624614 def factorize (self , na_sentinel = - 1 ):
625- # type: (int) -> Tuple[ndarray, ExtensionArray]
626615 """
627616 Encode the extension array as an enumerated type.
628617
@@ -725,7 +714,6 @@ def repeat(self, repeats, axis=None):
725714 # ------------------------------------------------------------------------
726715
727716 def take (self , indices , allow_fill = False , fill_value = None ):
728- # type: (Sequence[int], bool, Optional[Any]) -> ExtensionArray
729717 """
730718 Take elements from an array.
731719
@@ -815,7 +803,6 @@ def take(self, indices, allow_fill=False, fill_value=None):
815803 raise AbstractMethodError (self )
816804
817805 def copy (self , deep = False ):
818- # type: (bool) -> ExtensionArray
819806 """
820807 Return a copy of the array.
821808
@@ -852,7 +839,6 @@ def __repr__(self):
852839 dtype = self .dtype )
853840
854841 def _formatter (self , boxed = False ):
855- # type: (bool) -> Callable[[Any], Optional[str]]
856842 """Formatting function for scalar values.
857843
858844 This is used in the default '__repr__'. The returned formatting
@@ -880,7 +866,6 @@ def _formatter(self, boxed=False):
880866 return repr
881867
882868 def _formatting_values (self ):
883- # type: () -> np.ndarray
884869 # At the moment, this has to be an array since we use result.dtype
885870 """
886871 An array of values to be printed in, e.g. the Series repr
@@ -897,7 +882,6 @@ def _formatting_values(self):
897882
898883 @classmethod
899884 def _concat_same_type (cls , to_concat ):
900- # type: (Sequence[ExtensionArray]) -> ExtensionArray
901885 """
902886 Concatenate multiple array
903887
@@ -920,7 +904,6 @@ def _concat_same_type(cls, to_concat):
920904
921905 @property
922906 def _ndarray_values (self ):
923- # type: () -> np.ndarray
924907 """
925908 Internal pandas method for lossy conversion to a NumPy ndarray.
926909
0 commit comments