Skip to content

Commit

Permalink
👽️ linalg: 1.15.0 support for nullspace()
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Dec 17, 2024
1 parent 2791deb commit 6089a52
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
1 change: 0 additions & 1 deletion .mypyignore-todo
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
scipy\.linalg\.(_?decomp_svd\.)?null_space
scipy\.linalg\._matfuncs_expm\.__all__

scipy\.ndimage\.__all__
Expand Down
29 changes: 26 additions & 3 deletions scipy-stubs/linalg/_decomp_svd.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ _ComplexSVD: TypeAlias = tuple[_Complex2D, _Float1D, _Complex2D]
_RealT = TypeVar("_RealT", bound=np.bool_ | np.integer[Any] | np.floating[Any])
_InexactT = TypeVar("_InexactT", bound=_Float | _Complex)

###

@overload
def svd(
a: onp.ToFloat2D,
Expand Down Expand Up @@ -88,11 +90,32 @@ def orth(A: onp.ToComplex2D, rcond: onp.ToFloat | None = None) -> _Inexact2D: ..

#
@overload
def null_space(A: onp.CanArray2D[_InexactT], rcond: onp.ToFloat | None = None) -> onp.Array2D[_InexactT]: ...
def null_space(
A: onp.CanArray2D[_InexactT],
rcond: onp.ToFloat | None = None,
*,
overwrite_a: onp.ToBool = False,
check_finite: onp.ToBool = True,
lapack_driver: _LapackDriver = "gesdd",
) -> onp.Array2D[_InexactT]: ...
@overload
def null_space(A: onp.ToFloat2D, rcond: onp.ToFloat | None = None) -> _Float2D: ...
def null_space(
A: onp.ToFloat2D,
rcond: onp.ToFloat | None = None,
*,
overwrite_a: onp.ToBool = False,
check_finite: onp.ToBool = True,
lapack_driver: _LapackDriver = "gesdd",
) -> _Float2D: ...
@overload
def null_space(A: onp.ToComplex2D, rcond: onp.ToFloat | None = None) -> _Inexact2D: ...
def null_space(
A: onp.ToComplex2D,
rcond: onp.ToFloat | None = None,
*,
overwrite_a: onp.ToBool = False,
check_finite: onp.ToBool = True,
lapack_driver: _LapackDriver = "gesdd",
) -> _Inexact2D: ...

#
def subspace_angles(A: onp.ToComplex2D, B: onp.ToComplex2D) -> _Float1D: ...
9 changes: 8 additions & 1 deletion scipy-stubs/linalg/decomp_svd.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ def get_lapack_funcs(names: object, arrays: object = ..., dtype: object = ..., i
@deprecated("will be removed in SciPy v2.0.0")
def diagsvd(s: object, M: object, N: object) -> object: ...
@deprecated("will be removed in SciPy v2.0.0")
def null_space(A: object, rcond: object = ...) -> object: ...
def null_space(
A: object,
rcond: object = ...,
*,
overwrite_a: bool = False,
check_finite: bool = True,
lapack_driver: str = "gesdd",
) -> object: ...
@deprecated("will be removed in SciPy v2.0.0")
def orth(A: object, rcond: object = ...) -> object: ...
@deprecated("will be removed in SciPy v2.0.0")
Expand Down

0 comments on commit 6089a52

Please sign in to comment.