@@ -10,7 +10,6 @@ import numpy as np
10
10
import numpy .typing as npt
11
11
import optype as op
12
12
import optype .numpy as onp
13
- import optype .typing as opt
14
13
from scipy ._typing import Casting , Falsy , OrderCF
15
14
from ._bsr import bsr_array , bsr_matrix
16
15
from ._coo import coo_array , coo_matrix
@@ -166,11 +165,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
166
165
@overload # dense array-like bool
167
166
def __init__ (self : _spbase [np .bool_ ], / , arg1 : _ToSparseSeq [bool ], * , maxprint : int | None = 50 ) -> None : ...
168
167
@overload # dense array-like int
169
- def __init__ (self : _spbase [np .int_ ], / , arg1 : _ToSparseSeq [opt .JustInt ], * , maxprint : int | None = 50 ) -> None : ...
168
+ def __init__ (self : _spbase [np .int_ ], / , arg1 : _ToSparseSeq [op .JustInt ], * , maxprint : int | None = 50 ) -> None : ...
170
169
@overload # dense array-like float
171
- def __init__ (self : _spbase [np .float64 ], / , arg1 : _ToSparseSeq [opt .JustFloat ], * , maxprint : int | None = 50 ) -> None : ...
170
+ def __init__ (self : _spbase [np .float64 ], / , arg1 : _ToSparseSeq [op .JustFloat ], * , maxprint : int | None = 50 ) -> None : ...
172
171
@overload # dense array-like cfloat
173
- def __init__ (self : _spbase [np .complex128 ], / , arg1 : _ToSparseSeq [opt .JustComplex ], * , maxprint : int | None = 50 ) -> None : ...
172
+ def __init__ (self : _spbase [np .complex128 ], / , arg1 : _ToSparseSeq [op .JustComplex ], * , maxprint : int | None = 50 ) -> None : ...
174
173
@overload # dense array-like real (pyright is wrong here)
175
174
def __init__ (self : _spbase [_CoFloat ], / , arg1 : _ToSparseSeq [float ], * , maxprint : int | None = 50 ) -> None : ... # pyright: ignore[reportOverlappingOverload]
176
175
@overload # dense array-like complex (pyright is wrong here)
@@ -330,17 +329,17 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
330
329
@overload # spmatrix[-Complex], /, other: array-like +Complex
331
330
def __mul__ (self : spmatrix [_FromComplex ], / , other : _To2D [float , _ToComplex64 ]) -> onp .Array2D [_SCT_co ]: ...
332
331
@overload # spmatrix[+Bool], /, other: scalar- or matrix-like ~Int
333
- def __mul__ (self : spmatrix [_ToBool ], / , other : _SparseLike [opt .JustInt , Int ]) -> spmatrix [Int ]: ...
332
+ def __mul__ (self : spmatrix [_ToBool ], / , other : _SparseLike [op .JustInt , Int ]) -> spmatrix [Int ]: ...
334
333
@overload # spmatrix[+Bool], /, other: array-like ~Int
335
- def __mul__ (self : spmatrix [_ToBool ], / , other : _To2D [opt .JustInt , Int ]) -> onp .Array2D [Int ]: ...
334
+ def __mul__ (self : spmatrix [_ToBool ], / , other : _To2D [op .JustInt , Int ]) -> onp .Array2D [Int ]: ...
336
335
@overload # spmatrix[+Int], /, other: scalar- or matrix-like ~Float
337
- def __mul__ (self : spmatrix [_ToInt ], / , other : _SparseLike [opt .JustFloat , Float ]) -> spmatrix [Float ]: ...
336
+ def __mul__ (self : spmatrix [_ToInt ], / , other : _SparseLike [op .JustFloat , Float ]) -> spmatrix [Float ]: ...
338
337
@overload # spmatrix[+Int], /, other: array-like ~Float
339
- def __mul__ (self : spmatrix [_ToInt ], / , other : _To2D [opt .JustFloat , Float ]) -> onp .Array2D [Float ]: ...
338
+ def __mul__ (self : spmatrix [_ToInt ], / , other : _To2D [op .JustFloat , Float ]) -> onp .Array2D [Float ]: ...
340
339
@overload # spmatrix[+Float], /, other: scalar- or matrix-like ~Complex
341
- def __mul__ (self : spmatrix [_ToFloat ], / , other : _SparseLike [opt .JustComplex , Complex ]) -> spmatrix [Complex ]: ...
340
+ def __mul__ (self : spmatrix [_ToFloat ], / , other : _SparseLike [op .JustComplex , Complex ]) -> spmatrix [Complex ]: ...
342
341
@overload # spmatrix[+Float], /, other: array-like ~Complex
343
- def __mul__ (self : spmatrix [_ToFloat ], / , other : _To2D [opt .JustComplex , Complex ]) -> onp .Array2D [Complex ]: ...
342
+ def __mul__ (self : spmatrix [_ToFloat ], / , other : _To2D [op .JustComplex , Complex ]) -> onp .Array2D [Complex ]: ...
344
343
@overload # Self[+Bool], /, other: -Int
345
344
def __mul__ (self : _spbase [_ToBool ], / , other : _FromIntT ) -> _spbase [_FromIntT , _ShapeT_co ]: ...
346
345
@overload # Self[+Int], /, other: -Float
@@ -388,15 +387,15 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
388
387
@overload # spmatrix[+Bool], other: scalar- or matrix-like ~Int
389
388
def __matmul__ (self : spmatrix [_ToBool ], other : _spbase [Int ], / ) -> _SpMatrixOut [Int ]: ...
390
389
@overload # spmatrix[+Bool], other: array-like ~Int
391
- def __matmul__ (self : spmatrix [_ToBool ], other : _To2D [opt .JustInt , Int ], / ) -> onp .Array2D [Int ]: ...
390
+ def __matmul__ (self : spmatrix [_ToBool ], other : _To2D [op .JustInt , Int ], / ) -> onp .Array2D [Int ]: ...
392
391
@overload # spmatrix[+Int], other: scalar- or matrix-like ~Float
393
392
def __matmul__ (self : spmatrix [_ToInt ], other : _spbase [Float ], / ) -> _SpMatrixOut [Float ]: ...
394
393
@overload # spmatrix[+Int], other: array-like ~Float
395
- def __matmul__ (self : spmatrix [_ToInt ], other : _To2D [opt .JustFloat , Float ], / ) -> onp .Array2D [Float ]: ...
394
+ def __matmul__ (self : spmatrix [_ToInt ], other : _To2D [op .JustFloat , Float ], / ) -> onp .Array2D [Float ]: ...
396
395
@overload # spmatrix[+Float], other: scalar- or matrix-like ~Complex
397
396
def __matmul__ (self : spmatrix [_ToFloat ], other : _spbase [Complex ], / ) -> _SpMatrixOut [Complex ]: ...
398
397
@overload # spmatrix[+Float], other: array-like ~Complex
399
- def __matmul__ (self : spmatrix [_ToFloat ], other : _To2D [opt .JustComplex , Complex ], / ) -> onp .Array2D [Complex ]: ...
398
+ def __matmul__ (self : spmatrix [_ToFloat ], other : _To2D [op .JustComplex , Complex ], / ) -> onp .Array2D [Complex ]: ...
400
399
@overload # catch-all
401
400
def __matmul__ (self , other : _To2DLike [complex , Scalar ] | _spbase , / ) -> _spbase [Any , Any ] | onp .Array [Any , Any ]: ...
402
401
@@ -457,11 +456,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
457
456
@overload # Self[-Complex], /, other: scalar-like +Complex
458
457
def dot (self : _SpFromComplexT , / , other : onp .ToComplex ) -> _SpFromComplexT : ...
459
458
@overload # spmatrix[+Bool], /, other: scalar-like ~Int
460
- def dot (self : spmatrix [_ToBool ], / , other : opt .JustInt ) -> spmatrix [Int ]: ...
459
+ def dot (self : spmatrix [_ToBool ], / , other : op .JustInt ) -> spmatrix [Int ]: ...
461
460
@overload # spmatrix[+Int], /, other: scalar-like ~Float
462
- def dot (self : spmatrix [_ToInt ], / , other : opt .JustFloat ) -> spmatrix [Float ]: ...
461
+ def dot (self : spmatrix [_ToInt ], / , other : op .JustFloat ) -> spmatrix [Float ]: ...
463
462
@overload # spmatrix[+Float], /, other: scalar-like ~Complex
464
- def dot (self : spmatrix [_ToFloat ], / , other : opt .JustComplex ) -> spmatrix [Complex ]: ...
463
+ def dot (self : spmatrix [_ToFloat ], / , other : op .JustComplex ) -> spmatrix [Complex ]: ...
465
464
@overload # sparray[-Bool], /, other: sparse +Bool
466
465
def dot (self : _SpArray , / , other : _spbase [_ToBool | _SCT_co ]) -> _SpArrayOut [_SCT_co ]: ...
467
466
@overload # sparray[-Bool], /, other: array-like +Bool
@@ -499,15 +498,15 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
499
498
@overload # spmatrix[+Bool], /, other: scalar- or matrix-like ~Int
500
499
def dot (self : spmatrix [_ToBool ], / , other : _spbase [Int ]) -> _SpMatrixOut [Int ]: ...
501
500
@overload # spmatrix[+Bool], /, other: array-like ~Int
502
- def dot (self : spmatrix [_ToBool ], / , other : _To2D [opt .JustInt , Int ]) -> onp .Array2D [Int ]: ...
501
+ def dot (self : spmatrix [_ToBool ], / , other : _To2D [op .JustInt , Int ]) -> onp .Array2D [Int ]: ...
503
502
@overload # spmatrix[+Int], /, other: scalar- or matrix-like ~Float
504
503
def dot (self : spmatrix [_ToInt ], / , other : _spbase [Float ]) -> _SpMatrixOut [Float ]: ...
505
504
@overload # spmatrix[+Int], /, other: array-like ~Float
506
- def dot (self : spmatrix [_ToInt ], / , other : _To2D [opt .JustFloat , Float ]) -> onp .Array2D [Float ]: ...
505
+ def dot (self : spmatrix [_ToInt ], / , other : _To2D [op .JustFloat , Float ]) -> onp .Array2D [Float ]: ...
507
506
@overload # spmatrix[+Float], /, other: scalar- or matrix-like ~Complex
508
507
def dot (self : spmatrix [_ToFloat ], / , other : _spbase [Complex ]) -> _SpMatrixOut [Complex ]: ...
509
508
@overload # spmatrix[+Float], /, other: array-like ~Complex
510
- def dot (self : spmatrix [_ToFloat ], / , other : _To2D [opt .JustComplex , Complex ]) -> onp .Array2D [Complex ]: ...
509
+ def dot (self : spmatrix [_ToFloat ], / , other : _To2D [op .JustComplex , Complex ]) -> onp .Array2D [Complex ]: ...
511
510
@overload # catch-all
512
511
def dot (self , / , other : _To2DLike [complex , Scalar ] | _spbase ) -> _spbase [Any , Any ] | onp .Array [Any , Any ]: ...
513
512
0 commit comments