Skip to content

Commit

Permalink
complete scipy.linalg.norm
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenham committed Oct 18, 2024
1 parent 19cbb82 commit c3251f4
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions scipy-stubs/linalg/_misc.pyi
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
from typing import Literal
from typing import Literal, overload

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 Untyped

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

class LinAlgWarning(RuntimeWarning): ...

@overload
def norm(
a: npt.ArrayLike,
ord: Literal["fro", "nuc", 0, 1, -1, 2, -2] | float | None = None,
axis: Untyped | None = None,
axis: None = None,
keepdims: bool = False,
check_finite: bool = 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,
) -> 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,
) -> np.float64 | npt.NDArray[np.float64]: ...

0 comments on commit c3251f4

Please sign in to comment.