Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👽️ sparse: 1.15.0 support #349

Merged
merged 12 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .mypyignore-todo
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
scipy\.sparse\.__all__
scipy\.sparse\._sputils\.__all__
scipy\.sparse\._(data\._data|compressed\._cs)_matrix\.__init__
scipy\.sparse\._(base\._sp|bsr\._bsr_|coo\._coo_|dia\._dia_|dok\._dok_|lil\._lil_)base\.__init__
scipy\.sparse\._(base\._sp|coo\._coo_|dia\._dia_|dok\._dok_|lil\._lil_)base\.count_nonzero
scipy\.sparse\.((_?base|_matrix|bsr|coo|csc|csr|dia|dok)\.)?spmatrix\.todense
scipy\.sparse\.(_?construct\.)?rand(om(_array)?)?
scipy\.sparse\._coo\._coo_base\.tensordot
scipy\.sparse\._data\._minmax_mixin\.(arg|nan)?(max|min)
scipy\.sparse\._sputils\.broadcast_shapes
scipy\.sparse\.(_sputils|base|compressed|bsr|coo|dia|dok)\.check_shape
scipy\.sparse\.(_sputils|compressed|bsr|coo|dia|dok)\.isshape
scipy\.sparse\.get_index_dtype
scipy\.sparse\.safely_cast_index_arrays

scipy\.sparse\.csgraph\.(_matching\.)?min_weight_full_bipartite_matching

scipy\.sparse\.linalg\._dsolve\.linsolve\.__all__
scipy\.sparse\.linalg\._dsolve\.linsolve\.is_sptriangular
scipy\.sparse\.linalg\._dsolve\.linsolve\.spbandwidth
scipy\.sparse\.linalg\.(_dsolve\.(linsolve\.)?)?splu
scipy\.sparse\.linalg\.(_?eigen\.(_svds\.)?)?svds


scipy\.spatial\.distance\.directed_hausdorff
scipy\.spatial\.transform\.(_?rotation\.)?Rotation\.random


scipy\.special\.(cython_special\.)?btdtri?
scipy\.special\.(assoc_)?legendre_p(_all)?
scipy\.special\.sph_(harm_y|legendre_p)(_all)?
Expand All @@ -35,7 +10,6 @@ scipy\.special\.(_?basic\.)?factorial(2|k)?
scipy\.special\._spherical_bessel\.spherical_kn_reflection
scipy\.special\._spherical_bessel\.use_reflection


scipy\.stats\.__all__
scipy\.stats\.distributions\.__all__
scipy\.stats\._(continuous_distns|discrete_distns|multivariate|stats_py)\.__all__
Expand Down
3 changes: 3 additions & 0 deletions scipy-stubs/sparse/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ from ._extract import find, tril, triu
from ._lil import isspmatrix_lil, lil_array, lil_matrix
from ._matrix import spmatrix
from ._matrix_io import load_npz, save_npz
from ._sputils import get_index_dtype, safely_cast_index_arrays

__all__ = [
"SparseEfficiencyWarning",
Expand Down Expand Up @@ -64,6 +65,7 @@ __all__ = [
"eye",
"eye_array",
"find",
"get_index_dtype",
"hstack",
"identity",
"issparse",
Expand All @@ -85,6 +87,7 @@ __all__ = [
"rand",
"random",
"random_array",
"safely_cast_index_arrays",
"save_npz",
"sparray",
"sparsetools",
Expand Down
183 changes: 111 additions & 72 deletions scipy-stubs/sparse/_base.pyi

Large diffs are not rendered by default.

31 changes: 22 additions & 9 deletions scipy-stubs/sparse/_bsr.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ from ._base import _spbase, sparray
from ._compressed import _cs_matrix
from ._data import _minmax_mixin
from ._matrix import spmatrix
from ._typing import Int, Scalar, ToShape2D
from ._typing import Int, Scalar, ToShape2d

__all__ = ["bsr_array", "bsr_matrix", "isspmatrix_bsr"]

Expand Down Expand Up @@ -47,16 +47,18 @@ class _bsr_base(_cs_matrix[_SCT, tuple[int, int]], _minmax_mixin[_SCT, tuple[int
self,
/,
arg1: _ToMatrix[_SCT] | _ToData[_SCT],
shape: ToShape2D | None = None,
shape: ToShape2d | None = None,
dtype: None = None,
copy: bool = False,
blocksize: tuple[int, int] | None = None,
*,
maxprint: int | None = None,
) -> None: ...
@overload # 2-d shape-like, dtype: None
def __init__(
self: _bsr_base[np.float64],
/,
arg1: ToShape2D,
arg1: ToShape2d,
shape: None = None,
dtype: None = None,
copy: bool = False,
Expand All @@ -67,61 +69,72 @@ class _bsr_base(_cs_matrix[_SCT, tuple[int, int]], _minmax_mixin[_SCT, tuple[int
self: _bsr_base[np.bool_],
/,
arg1: _ToMatrixPy[bool],
shape: ToShape2D | None = None,
shape: ToShape2d | None = None,
dtype: onp.AnyBoolDType | None = None,
copy: bool = False,
blocksize: tuple[int, int] | None = None,
*,
maxprint: int | None = None,
) -> None: ...
@overload # matrix-like builtins.int, dtype: type[int] | None
def __init__(
self: _bsr_base[np.int_],
/,
arg1: _ToMatrixPy[opt.JustInt],
shape: ToShape2D | None = None,
shape: ToShape2d | None = None,
dtype: type[opt.JustInt] | onp.AnyIntPDType | None = None,
copy: bool = False,
blocksize: tuple[int, int] | None = None,
*,
maxprint: int | None = None,
) -> None: ...
@overload # matrix-like builtins.float, dtype: type[float] | None
def __init__(
self: _bsr_base[np.float64],
/,
arg1: _ToMatrixPy[opt.Just[float]],
shape: ToShape2D | None = None,
shape: ToShape2d | None = None,
dtype: type[opt.Just[float]] | onp.AnyFloat64DType | None = None,
copy: bool = False,
blocksize: tuple[int, int] | None = None,
*,
maxprint: int | None = None,
) -> None: ...
@overload # matrix-like builtins.complex, dtype: type[complex] | None
def __init__(
self: _bsr_base[np.complex128],
/,
arg1: _ToMatrixPy[opt.Just[complex]],
shape: ToShape2D | None = None,
shape: ToShape2d | None = None,
dtype: type[opt.Just[complex]] | onp.AnyComplex128DType | None = None,
copy: bool = False,
blocksize: tuple[int, int] | None = None,
*,
maxprint: int | None = None,
) -> None: ...
@overload # dtype: <known> (positional)
def __init__(
self,
/,
arg1: onp.ToComplexND,
shape: ToShape2D | None,
shape: ToShape2d | None,
dtype: _ToDType[_SCT],
copy: bool = False,
blocksize: tuple[int, int] | None = None,
*,
maxprint: int | None = None,
) -> None: ...
@overload # dtype: <known> (keyword)
def __init__(
self,
/,
arg1: onp.ToComplexND,
shape: ToShape2D | None = None,
shape: ToShape2d | None = None,
*,
dtype: _ToDType[_SCT],
copy: bool = False,
blocksize: tuple[int, int] | None = None,
maxprint: int | None = None,
) -> None: ...

class bsr_array(_bsr_base[_SCT], sparray, Generic[_SCT]): ...
Expand Down
Loading
Loading