Skip to content

Commit

Permalink
accept broader boolean arguments in scipy.linalg.norm
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Oct 18, 2024
1 parent ed07115 commit d5b3910
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scipy-stubs/linalg/_misc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import numpy as np
import numpy.typing as npt
import optype.typing as opt
from numpy.linalg import LinAlgError # noqa: ICN003
from scipy._typing import AnyBool

__all__ = ["LinAlgError", "LinAlgWarning", "norm"]

Expand All @@ -14,23 +15,23 @@ def norm(
a: npt.ArrayLike,
ord: Literal["fro", "nuc", 0, 1, -1, 2, -2] | float | None = None,
axis: None = None,
keepdims: bool = False,
check_finite: bool = True,
keepdims: AnyBool = False,
check_finite: AnyBool = True,
) -> np.float64: ...
@overload
def norm(
a: npt.ArrayLike,
ord: Literal["fro", "nuc", 0, 1, -1, 2, -2] | float | None,
axis: opt.AnyInt | tuple[opt.AnyInt, ...],
keepdims: bool = False,
check_finite: bool = True,
keepdims: AnyBool = False,
check_finite: AnyBool = True,
) -> np.float64 | npt.NDArray[np.float64]: ...
@overload
def norm(
a: npt.ArrayLike,
ord: Literal["fro", "nuc", 0, 1, -1, 2, -2] | float | None = None,
*,
axis: opt.AnyInt | tuple[opt.AnyInt, ...],
keepdims: bool = False,
check_finite: bool = True,
keepdims: AnyBool = False,
check_finite: AnyBool = True,
) -> np.float64 | npt.NDArray[np.float64]: ...

0 comments on commit d5b3910

Please sign in to comment.