Skip to content

Commit f500a56

Browse files
authored
🎨 optype 0.8 simplifications (#382)
2 parents b64ea5f + 61294d6 commit f500a56

25 files changed

+414
-422
lines changed

‎scipy-stubs/linalg/_matfuncs.pyi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ from typing import Any, Literal, TypeAlias, overload
33

44
import numpy as np
55
import optype.numpy as onp
6-
import optype.typing as opt
76
from ._expm_frechet import expm_cond, expm_frechet
87
from ._matfuncs_sqrtm import sqrtm
98

@@ -52,7 +51,7 @@ def fractional_matrix_power(A: onp.ToFloat2D, t: onp.ToInt) -> _Real2D: ...
5251
@overload # complex, int
5352
def fractional_matrix_power(A: onp.ToComplex2D, t: onp.ToInt) -> _Numeric2D: ...
5453
@overload # complex, float
55-
def fractional_matrix_power(A: onp.ToComplex2D, t: opt.Just[float] | np.floating[Any]) -> _Complex2D: ...
54+
def fractional_matrix_power(A: onp.ToComplex2D, t: onp.ToJustFloat) -> _Complex2D: ...
5655

5756
# NOTE: return dtype depends on the sign of the values
5857
@overload # disp: True = ...

‎scipy-stubs/linalg/_sketches.pyi

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
1-
from collections.abc import Sequence
2-
from typing import Any, TypeAlias, TypeVar, overload
1+
from typing import overload
32

43
import numpy as np
54
import optype.numpy as onp
6-
import optype.typing as opt
7-
import scipy._typing as spt
5+
from scipy._typing import ToRNG
86
from scipy.sparse import csc_matrix
97

108
__all__ = ["clarkson_woodruff_transform"]
119

12-
_ST = TypeVar("_ST", bound=np.generic)
13-
_VT = TypeVar("_VT")
14-
15-
_ToJust2D: TypeAlias = onp.CanArrayND[_ST] | Sequence[onp.CanArrayND[_ST]] | Sequence[Sequence[opt.Just[_VT] | _ST]]
16-
1710
###
1811

19-
def cwt_matrix(n_rows: onp.ToInt, n_columns: onp.ToInt, rng: spt.ToRNG = None) -> csc_matrix: ...
12+
def cwt_matrix(n_rows: onp.ToInt, n_columns: onp.ToInt, rng: ToRNG = None) -> csc_matrix: ...
2013

2114
#
2215
@overload
23-
def clarkson_woodruff_transform(
24-
input_matrix: onp.ToInt2D,
25-
sketch_size: onp.ToInt,
26-
rng: spt.ToRNG = None,
27-
) -> onp.Array2D[np.int_]: ...
16+
def clarkson_woodruff_transform(input_matrix: onp.ToInt2D, sketch_size: onp.ToInt, rng: ToRNG = None) -> onp.Array2D[np.int_]: ...
2817
@overload
2918
def clarkson_woodruff_transform(
30-
input_matrix: _ToJust2D[np.floating[Any], float],
19+
input_matrix: onp.ToJustFloat2D,
3120
sketch_size: onp.ToInt,
32-
rng: spt.ToRNG = None,
21+
rng: ToRNG = None,
3322
) -> onp.Array2D[np.float64 | np.longdouble]: ...
3423
@overload
3524
def clarkson_woodruff_transform(
36-
input_matrix: _ToJust2D[np.complexfloating[Any, Any], complex],
25+
input_matrix: onp.ToJustComplex2D,
3726
sketch_size: onp.ToInt,
38-
rng: spt.ToRNG = None,
27+
rng: ToRNG = None,
3928
) -> onp.Array2D[np.complex64 | np.clongdouble]: ...

‎scipy-stubs/linalg/_special_matrices.pyi

Lines changed: 113 additions & 115 deletions
Large diffs are not rendered by default.

‎scipy-stubs/sparse/_base.pyi

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ from ._typing import (
2525
Float,
2626
Index1D,
2727
Int,
28-
Matrix,
2928
Scalar,
3029
Shape,
3130
ShapeCOO,
@@ -161,12 +160,12 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
161160
@overload # dense array-like int
162161
def __init__(self: _spbase[np.int_], /, arg1: _ToSparseFromPy[opt.JustInt], *, maxprint: int | None = 50) -> None: ...
163162
@overload # dense array-like float
164-
def __init__(self: _spbase[np.float64], /, arg1: _ToSparseFromPy[opt.Just[float]], *, maxprint: int | None = 50) -> None: ...
163+
def __init__(self: _spbase[np.float64], /, arg1: _ToSparseFromPy[opt.JustFloat], *, maxprint: int | None = 50) -> None: ...
165164
@overload # dense array-like cfloat
166165
def __init__(
167166
self: _spbase[np.complex128],
168167
/,
169-
arg1: _ToSparseFromPy[opt.Just[complex]],
168+
arg1: _ToSparseFromPy[opt.JustComplex],
170169
*,
171170
maxprint: int | None = 50,
172171
) -> None: ...
@@ -272,11 +271,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
272271
@overload # sparse[-Complex], sparse[+Complex64]
273272
def __add__(self: _SpFromComplexT, other: _spbase[_ToComplex64], /) -> _SpFromComplexT: ...
274273
@overload # spmatrix[-Int], array[+Int8]
275-
def __add__(self: spmatrix[_FromInt], other: onp.ArrayND[_ToInt8], /) -> Matrix[_SCT_co]: ...
274+
def __add__(self: spmatrix[_FromInt], other: onp.ArrayND[_ToInt8], /) -> onp.Matrix[_SCT_co]: ...
276275
@overload # spmatrix[-Float], array[+Float32]
277-
def __add__(self: spmatrix[_FromFloat], other: onp.ArrayND[_ToFloat32], /) -> Matrix[_SCT_co]: ...
276+
def __add__(self: spmatrix[_FromFloat], other: onp.ArrayND[_ToFloat32], /) -> onp.Matrix[_SCT_co]: ...
278277
@overload # spmatrix[-Complex], array[+Complex64]
279-
def __add__(self: spmatrix[_FromComplex], other: onp.ArrayND[_ToComplex64], /) -> Matrix[_SCT_co]: ...
278+
def __add__(self: spmatrix[_FromComplex], other: onp.ArrayND[_ToComplex64], /) -> onp.Matrix[_SCT_co]: ...
280279
@overload # sparse[-Int], array[+Int8]
281280
def __add__(self: _spbase[_FromInt], other: onp.ArrayND[_ToInt8], /) -> onp.ArrayND[_SCT_co, _ShapeT_co]: ...
282281
@overload # sparse[-Float], array[+Float32]
@@ -297,11 +296,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
297296
@overload # sparse[-Complex], sparse[+Complex64]
298297
def __sub__(self: _SpFromComplexT, other: _spbase[_ToComplex64], /) -> _SpFromComplexT: ...
299298
@overload # spmatrix[-Int], array[+Int8]
300-
def __sub__(self: spmatrix[_FromInt], other: onp.ArrayND[_ToInt8], /) -> Matrix[_SCT_co]: ...
299+
def __sub__(self: spmatrix[_FromInt], other: onp.ArrayND[_ToInt8], /) -> onp.Matrix[_SCT_co]: ...
301300
@overload # spmatrix[-Float], array[+Float32]
302-
def __sub__(self: spmatrix[_FromFloat], other: onp.ArrayND[_ToFloat32], /) -> Matrix[_SCT_co]: ...
301+
def __sub__(self: spmatrix[_FromFloat], other: onp.ArrayND[_ToFloat32], /) -> onp.Matrix[_SCT_co]: ...
303302
@overload # spmatrix[-Complex], array[+Complex64]
304-
def __sub__(self: spmatrix[_FromComplex], other: onp.ArrayND[_ToComplex64], /) -> Matrix[_SCT_co]: ...
303+
def __sub__(self: spmatrix[_FromComplex], other: onp.ArrayND[_ToComplex64], /) -> onp.Matrix[_SCT_co]: ...
305304
@overload # sparse[-Int], array[+Int8]
306305
def __sub__(self: _spbase[_FromInt], other: onp.ArrayND[_ToInt8], /) -> onp.ArrayND[_SCT_co, _ShapeT_co]: ...
307306
@overload # sparse[-Float], array[+Float32]
@@ -360,13 +359,13 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
360359
@overload # spmatrix[+Bool], /, other: array-like ~Int
361360
def __mul__(self: spmatrix[_ToBool], /, other: _DualArrayLike2d[opt.JustInt, Int]) -> onp.Array2D[Int]: ...
362361
@overload # spmatrix[+Int], /, other: scalar- or matrix-like ~Float
363-
def __mul__(self: spmatrix[_ToInt], /, other: _DualMatrixLike[opt.Just[float], Float]) -> spmatrix[Float]: ...
362+
def __mul__(self: spmatrix[_ToInt], /, other: _DualMatrixLike[opt.JustFloat, Float]) -> spmatrix[Float]: ...
364363
@overload # spmatrix[+Int], /, other: array-like ~Float
365-
def __mul__(self: spmatrix[_ToInt], /, other: _DualArrayLike2d[opt.Just[float], Float]) -> onp.Array2D[Float]: ...
364+
def __mul__(self: spmatrix[_ToInt], /, other: _DualArrayLike2d[opt.JustFloat, Float]) -> onp.Array2D[Float]: ...
366365
@overload # spmatrix[+Float], /, other: scalar- or matrix-like ~Complex
367-
def __mul__(self: spmatrix[_ToFloat], /, other: _DualMatrixLike[opt.Just[complex], Complex]) -> spmatrix[Complex]: ...
366+
def __mul__(self: spmatrix[_ToFloat], /, other: _DualMatrixLike[opt.JustComplex, Complex]) -> spmatrix[Complex]: ...
368367
@overload # spmatrix[+Float], /, other: array-like ~Complex
369-
def __mul__(self: spmatrix[_ToFloat], /, other: _DualArrayLike2d[opt.Just[complex], Complex]) -> onp.Array2D[Complex]: ...
368+
def __mul__(self: spmatrix[_ToFloat], /, other: _DualArrayLike2d[opt.JustComplex, Complex]) -> onp.Array2D[Complex]: ...
370369
@overload # Self[+Bool], /, other: -Int
371370
def __mul__(self: _spbase[_ToBool], /, other: _FromIntT) -> _spbase[_FromIntT, _ShapeT_co]: ...
372371
@overload # Self[+Int], /, other: -Float
@@ -424,11 +423,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
424423
@overload # spmatrix[+Int], other: scalar- or matrix-like ~Float
425424
def __matmul__(self: spmatrix[_ToInt], other: _spbase[Float], /) -> _SpMatrixOut[Float]: ...
426425
@overload # spmatrix[+Int], other: array-like ~Float
427-
def __matmul__(self: spmatrix[_ToInt], other: _DualArrayLike2d[opt.Just[float], Float], /) -> onp.Array2D[Float]: ...
426+
def __matmul__(self: spmatrix[_ToInt], other: _DualArrayLike2d[opt.JustFloat, Float], /) -> onp.Array2D[Float]: ...
428427
@overload # spmatrix[+Float], other: scalar- or matrix-like ~Complex
429428
def __matmul__(self: spmatrix[_ToFloat], other: _spbase[Complex], /) -> _SpMatrixOut[Complex]: ...
430429
@overload # spmatrix[+Float], other: array-like ~Complex
431-
def __matmul__(self: spmatrix[_ToFloat], other: _DualArrayLike2d[opt.Just[complex], Complex], /) -> onp.Array2D[Complex]: ...
430+
def __matmul__(self: spmatrix[_ToFloat], other: _DualArrayLike2d[opt.JustComplex, Complex], /) -> onp.Array2D[Complex]: ...
432431
@overload # catch-all
433432
def __matmul__(self, other: _DualArrayLike[complex, Scalar] | _spbase, /) -> _spbase[Any, Any] | onp.Array[Any, Any]: ...
434433
__rmatmul__ = __matmul__
@@ -449,11 +448,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
449448
@overload
450449
def __truediv__(self: spmatrix, rhs: onp.ArrayND[Scalar], /) -> coo_matrix[np.int_ | _FromFloat]: ...
451450
@overload
452-
def __truediv__(self: spmatrix, rhs: _spbase[_FromComplex], /) -> Matrix[_FromComplex]: ...
451+
def __truediv__(self: spmatrix, rhs: _spbase[_FromComplex], /) -> onp.Matrix[_FromComplex]: ...
453452
@overload
454-
def __truediv__(self: spmatrix, rhs: _spbase[_FromFloat], /) -> Matrix[_FromFloat]: ...
453+
def __truediv__(self: spmatrix, rhs: _spbase[_FromFloat], /) -> onp.Matrix[_FromFloat]: ...
455454
@overload
456-
def __truediv__(self: spmatrix, rhs: _spbase, /) -> Matrix[np.int_ | _FromFloat]: ...
455+
def __truediv__(self: spmatrix, rhs: _spbase, /) -> onp.Matrix[np.int_ | _FromFloat]: ...
457456
@overload
458457
def __truediv__(self, rhs: _spbase[_FromComplex], /) -> onp.ArrayND[_FromComplex, _ShapeT_co]: ...
459458
@overload
@@ -477,9 +476,9 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
477476
@overload # spmatrix[+Bool], /, other: scalar-like ~Int
478477
def dot(self: spmatrix[_ToBool], /, other: opt.JustInt) -> spmatrix[Int]: ...
479478
@overload # spmatrix[+Int], /, other: scalar-like ~Float
480-
def dot(self: spmatrix[_ToInt], /, other: opt.Just[float]) -> spmatrix[Float]: ...
479+
def dot(self: spmatrix[_ToInt], /, other: opt.JustFloat) -> spmatrix[Float]: ...
481480
@overload # spmatrix[+Float], /, other: scalar-like ~Complex
482-
def dot(self: spmatrix[_ToFloat], /, other: opt.Just[complex]) -> spmatrix[Complex]: ...
481+
def dot(self: spmatrix[_ToFloat], /, other: opt.JustComplex) -> spmatrix[Complex]: ...
483482
@overload # sparray[-Bool], /, other: sparse +Bool
484483
def dot(self: _SpArray, /, other: _spbase[_ToBool | _SCT_co]) -> _SpArrayOut[_SCT_co]: ...
485484
@overload # sparray[-Bool], /, other: array-like +Bool
@@ -521,11 +520,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
521520
@overload # spmatrix[+Int], /, other: scalar- or matrix-like ~Float
522521
def dot(self: spmatrix[_ToInt], /, other: _spbase[Float]) -> _SpMatrixOut[Float]: ...
523522
@overload # spmatrix[+Int], /, other: array-like ~Float
524-
def dot(self: spmatrix[_ToInt], /, other: _DualArrayLike2d[opt.Just[float], Float]) -> onp.Array2D[Float]: ...
523+
def dot(self: spmatrix[_ToInt], /, other: _DualArrayLike2d[opt.JustFloat, Float]) -> onp.Array2D[Float]: ...
525524
@overload # spmatrix[+Float], /, other: scalar- or matrix-like ~Complex
526525
def dot(self: spmatrix[_ToFloat], /, other: _spbase[Complex]) -> _SpMatrixOut[Complex]: ...
527526
@overload # spmatrix[+Float], /, other: array-like ~Complex
528-
def dot(self: spmatrix[_ToFloat], /, other: _DualArrayLike2d[opt.Just[complex], Complex]) -> onp.Array2D[Complex]: ...
527+
def dot(self: spmatrix[_ToFloat], /, other: _DualArrayLike2d[opt.JustComplex, Complex]) -> onp.Array2D[Complex]: ...
529528
@overload # catch-all
530529
def dot(self, /, other: _DualArrayLike[complex, Scalar] | _spbase) -> _spbase[Any, Any] | onp.Array[Any, Any]: ...
531530

@@ -551,7 +550,7 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
551550
@overload # sparray, dense
552551
def maximum(self: sparray, /, other: onp.ArrayND[_SCT]) -> onp.ArrayND[_SCT_co | _SCT, _ShapeT_co]: ...
553552
@overload # spmatrix, dense
554-
def maximum(self: spmatrix, /, other: onp.ArrayND[_SCT]) -> Matrix[_SCT_co | _SCT]: ...
553+
def maximum(self: spmatrix, /, other: onp.ArrayND[_SCT]) -> onp.Matrix[_SCT_co | _SCT]: ...
555554
@overload # sparray, unknown scalar
556555
def maximum(self: sparray, /, other: onp.ToComplex) -> _SpArrayOut[Any]: ...
557556
@overload # spmatrix, unknown scalar
@@ -579,7 +578,7 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
579578
@overload # sparray, dense
580579
def minimum(self: sparray, /, other: onp.ArrayND[_SCT]) -> onp.ArrayND[_SCT_co | _SCT, _ShapeT_co]: ...
581580
@overload # spmatrix, dense
582-
def minimum(self: spmatrix, /, other: onp.ArrayND[_SCT]) -> Matrix[_SCT_co | _SCT]: ...
581+
def minimum(self: spmatrix, /, other: onp.ArrayND[_SCT]) -> onp.Matrix[_SCT_co | _SCT]: ...
583582
@overload # sparray, unknown scalar
584583
def minimum(self: sparray, /, other: onp.ToComplex) -> _SpArrayOut[Any]: ...
585584
@overload # spmatrix, unknown scalar
@@ -622,7 +621,7 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
622621
@overload # sparray[-Bool, 2d], axis: index
623622
def sum(self: _SpArray2D[np.bool_], /, axis: op.CanIndex, dtype: None = None, out: None = None) -> onp.Array1D[np.int_]: ...
624623
@overload # spmatrix[-Bool], axis: index
625-
def sum(self: spmatrix[np.bool_], /, axis: op.CanIndex, dtype: None = None, out: None = None) -> Matrix[np.int_]: ...
624+
def sum(self: spmatrix[np.bool_], /, axis: op.CanIndex, dtype: None = None, out: None = None) -> onp.Matrix[np.int_]: ...
626625
@overload # Self[-Int]
627626
def sum(self: _spbase[_FromIntT], /, axis: None = None, dtype: None = None, out: None = None) -> _FromIntT: ...
628627
@overload # sparray[-Int, 1d], axis: index
@@ -642,9 +641,9 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
642641
out: None = None,
643642
) -> onp.Array1D[_FromIntT]: ...
644643
@overload # spmatrix[-Int], axis: index
645-
def sum(self: spmatrix[_FromIntT], /, axis: op.CanIndex, dtype: None = None, out: None = None) -> Matrix[_FromIntT]: ...
644+
def sum(self: spmatrix[_FromIntT], /, axis: op.CanIndex, dtype: None = None, out: None = None) -> onp.Matrix[_FromIntT]: ...
646645
@overload # spmatrix, axis: index, dtype: <unknown>
647-
def sum(self: spmatrix, /, axis: op.CanIndex, dtype: npt.DTypeLike, out: None = None) -> Matrix[Any]: ...
646+
def sum(self: spmatrix, /, axis: op.CanIndex, dtype: npt.DTypeLike, out: None = None) -> onp.Matrix[Any]: ...
648647
@overload # dtype: <unknown> (keyword)
649648
def sum(self, /, axis: op.CanIndex | None = None, *, dtype: npt.DTypeLike, out: None = None) -> Any: ... # noqa: ANN401
650649

@@ -680,7 +679,7 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
680679
axis: op.CanIndex,
681680
dtype: None = None,
682681
out: None = None,
683-
) -> Matrix[np.float64]: ...
682+
) -> onp.Matrix[np.float64]: ...
684683
@overload # sparray[-Float, 1d]
685684
def mean(
686685
self: _SpArray1D[_FromFloatT],
@@ -698,9 +697,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
698697
out: None = None,
699698
) -> onp.Array1D[_FromFloatT]: ...
700699
@overload # spmatrix[-Float], axis: index
701-
def mean(self: spmatrix[_FromFloatT], /, axis: op.CanIndex, dtype: None = None, out: None = None) -> Matrix[_FromFloatT]: ...
700+
def mean(
701+
self: spmatrix[_FromFloatT], /, axis: op.CanIndex, dtype: None = None, out: None = None
702+
) -> onp.Matrix[_FromFloatT]: ...
702703
@overload # spmatrix, axis: index, dtype: <unknown>
703-
def mean(self: spmatrix, /, axis: op.CanIndex, dtype: npt.DTypeLike, out: None = None) -> Matrix[Any]: ...
704+
def mean(self: spmatrix, /, axis: op.CanIndex, dtype: npt.DTypeLike, out: None = None) -> onp.Matrix[Any]: ...
704705
@overload # dtype: <unknown> (keyword)
705706
def mean(self, /, axis: op.CanIndex | None = None, *, dtype: npt.DTypeLike, out: None = None) -> Any: ... # noqa: ANN401
706707

@@ -925,11 +926,11 @@ class _spbase(Generic[_SCT_co, _ShapeT_co]):
925926

926927
#
927928
@overload # self: spmatrix, out: None
928-
def todense(self: spmatrix, /, order: OrderCF | None = None, out: None = None) -> Matrix[_SCT_co]: ...
929+
def todense(self: spmatrix, /, order: OrderCF | None = None, out: None = None) -> onp.Matrix[_SCT_co]: ...
929930
@overload # self: spmatrix, out: array (positional)
930-
def todense(self: spmatrix, /, order: OrderCF | None, out: onp.ArrayND[_SCT]) -> Matrix[_SCT]: ...
931+
def todense(self: spmatrix, /, order: OrderCF | None, out: onp.ArrayND[_SCT]) -> onp.Matrix[_SCT]: ...
931932
@overload # self: spmatrix, out: array (keyword)
932-
def todense(self: spmatrix, /, order: OrderCF | None = None, *, out: onp.ArrayND[_SCT]) -> Matrix[_SCT]: ...
933+
def todense(self: spmatrix, /, order: OrderCF | None = None, *, out: onp.ArrayND[_SCT]) -> onp.Matrix[_SCT]: ...
933934
@overload # out: None
934935
def todense(self, /, order: OrderCF | None = None, out: None = None) -> onp.Array[_ShapeT_co, _SCT_co]: ...
935936
@overload # out: array (positional)

‎scipy-stubs/sparse/_bsr.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ class _bsr_base(_cs_matrix[_SCT, tuple[int, int]], _minmax_mixin[_SCT, tuple[int
9292
def __init__(
9393
self: _bsr_base[np.float64],
9494
/,
95-
arg1: _ToMatrixPy[opt.Just[float]],
95+
arg1: _ToMatrixPy[opt.JustFloat],
9696
shape: ToShape2d | None = None,
97-
dtype: type[opt.Just[float]] | onp.AnyFloat64DType | None = None,
97+
dtype: type[opt.JustFloat] | onp.AnyFloat64DType | None = None,
9898
copy: bool = False,
9999
blocksize: tuple[int, int] | None = None,
100100
*,
@@ -104,9 +104,9 @@ class _bsr_base(_cs_matrix[_SCT, tuple[int, int]], _minmax_mixin[_SCT, tuple[int
104104
def __init__(
105105
self: _bsr_base[np.complex128],
106106
/,
107-
arg1: _ToMatrixPy[opt.Just[complex]],
107+
arg1: _ToMatrixPy[opt.JustComplex],
108108
shape: ToShape2d | None = None,
109-
dtype: type[opt.Just[complex]] | onp.AnyComplex128DType | None = None,
109+
dtype: type[opt.JustComplex] | onp.AnyComplex128DType | None = None,
110110
copy: bool = False,
111111
blocksize: tuple[int, int] | None = None,
112112
*,

‎scipy-stubs/sparse/_compressed.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class _cs_matrix(
184184
def __init__(
185185
self: _cs_matrix[np.float64, tuple[int]],
186186
/,
187-
arg1: Sequence[opt.Just[float]],
187+
arg1: Sequence[opt.JustFloat],
188188
shape: ToShape1dNd | None = None,
189189
dtype: ToDTypeFloat | None = None,
190190
copy: bool = False,
@@ -195,7 +195,7 @@ class _cs_matrix(
195195
def __init__(
196196
self: _cs_matrix[np.float64, tuple[int, int]],
197197
/,
198-
arg1: Sequence[Sequence[opt.Just[float]]],
198+
arg1: Sequence[Sequence[opt.JustFloat]],
199199
shape: ToShape1dNd | None = None,
200200
dtype: ToDTypeFloat | None = None,
201201
copy: bool = False,
@@ -206,7 +206,7 @@ class _cs_matrix(
206206
def __init__(
207207
self: _cs_matrix[np.complex128, tuple[int]],
208208
/,
209-
arg1: Sequence[opt.Just[complex]],
209+
arg1: Sequence[opt.JustComplex],
210210
shape: ToShape1dNd | None = None,
211211
dtype: ToDTypeComplex | None = None,
212212
copy: bool = False,
@@ -217,7 +217,7 @@ class _cs_matrix(
217217
def __init__(
218218
self: _cs_matrix[np.complex128, tuple[int, int]],
219219
/,
220-
arg1: Sequence[Sequence[opt.Just[complex]]],
220+
arg1: Sequence[Sequence[opt.JustComplex]],
221221
shape: ToShape1dNd | None = None,
222222
dtype: ToDTypeComplex | None = None,
223223
copy: bool = False,

0 commit comments

Comments
 (0)