You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
201 lines
5.1 KiB
201 lines
5.1 KiB
"""
|
|
This type stub file was generated by pyright.
|
|
"""
|
|
|
|
from ._array_object import Array
|
|
from typing import NamedTuple, TYPE_CHECKING
|
|
from ._typing import Dtype, Literal, Optional, Sequence, Tuple, Union
|
|
|
|
if TYPE_CHECKING:
|
|
...
|
|
class EighResult(NamedTuple):
|
|
eigenvalues: Array
|
|
eigenvectors: Array
|
|
...
|
|
|
|
|
|
class QRResult(NamedTuple):
|
|
Q: Array
|
|
R: Array
|
|
...
|
|
|
|
|
|
class SlogdetResult(NamedTuple):
|
|
sign: Array
|
|
logabsdet: Array
|
|
...
|
|
|
|
|
|
class SVDResult(NamedTuple):
|
|
U: Array
|
|
S: Array
|
|
Vh: Array
|
|
...
|
|
|
|
|
|
def cholesky(x: Array, /, *, upper: bool = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.cholesky <numpy.linalg.cholesky>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def cross(x1: Array, x2: Array, /, *, axis: int = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.cross <numpy.cross>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def det(x: Array, /) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.det <numpy.linalg.det>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def diagonal(x: Array, /, *, offset: int = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.diagonal <numpy.diagonal>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def eigh(x: Array, /) -> EighResult:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.eigh <numpy.linalg.eigh>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def eigvalsh(x: Array, /) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.eigvalsh <numpy.linalg.eigvalsh>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def inv(x: Array, /) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.inv <numpy.linalg.inv>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def matmul(x1: Array, x2: Array, /) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.matmul <numpy.matmul>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def matrix_norm(x: Array, /, *, keepdims: bool = ..., ord: Optional[Union[int, float, Literal[fro, nuc]]] = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.norm <numpy.linalg.norm>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def matrix_power(x: Array, n: int, /) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.matrix_power <numpy.matrix_power>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def matrix_rank(x: Array, /, *, rtol: Optional[Union[float, Array]] = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.matrix_rank <numpy.matrix_rank>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def matrix_transpose(x: Array, /) -> Array:
|
|
...
|
|
|
|
def outer(x1: Array, x2: Array, /) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.outer <numpy.outer>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def pinv(x: Array, /, *, rtol: Optional[Union[float, Array]] = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.pinv <numpy.linalg.pinv>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def qr(x: Array, /, *, mode: Literal[reduced, complete] = ...) -> QRResult:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.qr <numpy.linalg.qr>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def slogdet(x: Array, /) -> SlogdetResult:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.slogdet <numpy.linalg.slogdet>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def solve(x1: Array, x2: Array, /) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.solve <numpy.linalg.solve>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def svd(x: Array, /, *, full_matrices: bool = ...) -> SVDResult:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.svd <numpy.linalg.svd>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def svdvals(x: Array, /) -> Union[Array, Tuple[Array, ...]]:
|
|
...
|
|
|
|
def tensordot(x1: Array, x2: Array, /, *, axes: Union[int, Tuple[Sequence[int], Sequence[int]]] = ...) -> Array:
|
|
...
|
|
|
|
def trace(x: Array, /, *, offset: int = ..., dtype: Optional[Dtype] = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.trace <numpy.trace>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
def vecdot(x1: Array, x2: Array, /, *, axis: int = ...) -> Array:
|
|
...
|
|
|
|
def vector_norm(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ..., ord: Optional[Union[int, float]] = ...) -> Array:
|
|
"""
|
|
Array API compatible wrapper for :py:func:`np.linalg.norm <numpy.linalg.norm>`.
|
|
|
|
See its docstring for more information.
|
|
"""
|
|
...
|
|
|
|
__all__ = ['cholesky', 'cross', 'det', 'diagonal', 'eigh', 'eigvalsh', 'inv', 'matmul', 'matrix_norm', 'matrix_power', 'matrix_rank', 'matrix_transpose', 'outer', 'pinv', 'qr', 'slogdet', 'solve', 'svd', 'svdvals', 'tensordot', 'trace', 'vecdot', 'vector_norm']
|