@@ -3,7 +3,7 @@ from pandas.core.arrays import (
3
3
ExtensionArray ,
4
4
ExtensionOpsMixin ,
5
5
)
6
- from pandas .core .base import PandasObject as PandasObject
6
+ from pandas .core .base import PandasObject
7
7
8
8
class SparseArray (PandasObject , ExtensionArray , ExtensionOpsMixin ):
9
9
def __init__ (
@@ -42,7 +42,13 @@ class SparseArray(PandasObject, ExtensionArray, ExtensionOpsMixin):
42
42
def fillna (self , value = ..., method = ..., limit = ...): ...
43
43
def shift (self , periods : int = ..., fill_value = ...): ...
44
44
def unique (self ): ...
45
- def factorize (self , na_sentinel : int = ...): ...
45
+ def factorize ( # type: ignore[override]
46
+ self ,
47
+ na_sentinel : int = ...,
48
+ # Not actually positional-only, used to handle deprecations in 1.5.0
49
+ * ,
50
+ use_na_sentinel : bool = ...,
51
+ ) -> tuple [np .ndarray , SparseArray ]: ...
46
52
def value_counts (self , dropna : bool = ...): ...
47
53
def __getitem__ (self , key ): ...
48
54
def take (self , indices , allow_fill : bool = ..., fill_value = ...): ...
@@ -62,5 +68,3 @@ class SparseArray(PandasObject, ExtensionArray, ExtensionOpsMixin):
62
68
def T (self ): ...
63
69
def __array_ufunc__ (self , ufunc , method , * inputs , ** kwargs ): ...
64
70
def __abs__ (self ): ...
65
-
66
- def make_sparse (arr , kind : str = ..., fill_value = ..., dtype = ..., copy : bool = ...): ...
0 commit comments