@@ -6,6 +6,7 @@ import numpy as np
6
6
import optype as op
7
7
import optype .numpy as onp
8
8
import optype .typing as opt
9
+ from scipy ._typing import Falsy
9
10
from ._base import _spbase , sparray
10
11
from ._csr import csr_array , csr_matrix
11
12
from ._index import IndexMixin
@@ -130,8 +131,28 @@ class _lil_base(_spbase[_SCT, tuple[int, int]], IndexMixin[_SCT, tuple[int, int]
130
131
131
132
#
132
133
@override
134
+ def __iadd__ (self , other : Falsy | _spbase [Scalar ] | onp .ArrayND [Scalar ], / ) -> Self : ...
135
+ @override
136
+ def __isub__ (self , other : Falsy | _spbase [Scalar ] | onp .ArrayND [Scalar ], / ) -> Self : ...
137
+ @override
138
+ def __imul__ (self , other : onp .ToComplex , / ) -> Self : ... # type: ignore[override]
139
+ @override
140
+ def __itruediv__ (self , other : onp .ToComplex , / ) -> Self : ... # type: ignore[override]
141
+ @override
142
+ def __idiv__ (self , other : onp .ToComplex , / ) -> Self : ...
143
+
144
+ #
145
+ @override
146
+ def tolil (self , / , copy : bool = False ) -> Self : ... # type: ignore[override]
147
+ @override
133
148
def resize (self , / , * shape : int ) -> None : ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride]
134
149
150
+ # NOTE: Adding `@override` here will crash stubtest (basedmypy 1.13.0)
151
+ @overload # type: ignore[explicit-override]
152
+ def count_nonzero (self , / , axis : None = None ) -> int : ...
153
+ @overload
154
+ def count_nonzero (self , / , axis : op .CanIndex ) -> onp .Array1D [np .intp ]: ...
155
+
135
156
#
136
157
def getrowview (self , / , i : int ) -> Self : ...
137
158
def getrow (self , / , i : onp .ToJustInt ) -> csr_array [_SCT , tuple [int , int ]] | csr_matrix [_SCT ]: ...
0 commit comments