Initial configuration commit
This commit is contained in:
commit
31c8abea59
266 changed files with 780274 additions and 0 deletions
152
typings/numpy/array_api/__init__.pyi
Normal file
152
typings/numpy/array_api/__init__.pyi
Normal file
|
@ -0,0 +1,152 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import warnings
|
||||
from ._constants import e, inf, nan, pi
|
||||
from ._creation_functions import arange, asarray, empty, empty_like, eye, from_dlpack, full, full_like, linspace, meshgrid, ones, ones_like, tril, triu, zeros, zeros_like
|
||||
from ._data_type_functions import astype, broadcast_arrays, broadcast_to, can_cast, finfo, iinfo, isdtype, result_type
|
||||
from ._dtypes import bool, complex128, complex64, float32, float64, int16, int32, int64, int8, uint16, uint32, uint64, uint8
|
||||
from ._elementwise_functions import abs, acos, acosh, add, asin, asinh, atan, atan2, atanh, bitwise_and, bitwise_invert, bitwise_left_shift, bitwise_or, bitwise_right_shift, bitwise_xor, ceil, conj, cos, cosh, divide, equal, exp, expm1, floor, floor_divide, greater, greater_equal, imag, isfinite, isinf, isnan, less, less_equal, log, log10, log1p, log2, logaddexp, logical_and, logical_not, logical_or, logical_xor, multiply, negative, not_equal, positive, pow, real, remainder, round, sign, sin, sinh, sqrt, square, subtract, tan, tanh, trunc
|
||||
from ._indexing_functions import take
|
||||
from . import linalg
|
||||
from .linalg import matmul, matrix_transpose, tensordot, vecdot
|
||||
from ._manipulation_functions import concat, expand_dims, flip, permute_dims, reshape, roll, squeeze, stack
|
||||
from ._searching_functions import argmax, argmin, nonzero, where
|
||||
from ._set_functions import unique_all, unique_counts, unique_inverse, unique_values
|
||||
from ._sorting_functions import argsort, sort
|
||||
from ._statistical_functions import max, mean, min, prod, std, sum, var
|
||||
from ._utility_functions import all, any
|
||||
|
||||
"""
|
||||
A NumPy sub-namespace that conforms to the Python array API standard.
|
||||
|
||||
This submodule accompanies NEP 47, which proposes its inclusion in NumPy. It
|
||||
is still considered experimental, and will issue a warning when imported.
|
||||
|
||||
This is a proof-of-concept namespace that wraps the corresponding NumPy
|
||||
functions to give a conforming implementation of the Python array API standard
|
||||
(https://data-apis.github.io/array-api/latest/). The standard is currently in
|
||||
an RFC phase and comments on it are both welcome and encouraged. Comments
|
||||
should be made either at https://github.com/data-apis/array-api or at
|
||||
https://github.com/data-apis/consortium-feedback/discussions.
|
||||
|
||||
NumPy already follows the proposed spec for the most part, so this module
|
||||
serves mostly as a thin wrapper around it. However, NumPy also implements a
|
||||
lot of behavior that is not included in the spec, so this serves as a
|
||||
restricted subset of the API. Only those functions that are part of the spec
|
||||
are included in this namespace, and all functions are given with the exact
|
||||
signature given in the spec, including the use of position-only arguments, and
|
||||
omitting any extra keyword arguments implemented by NumPy but not part of the
|
||||
spec. The behavior of some functions is also modified from the NumPy behavior
|
||||
to conform to the standard. Note that the underlying array object itself is
|
||||
wrapped in a wrapper Array() class, but is otherwise unchanged. This submodule
|
||||
is implemented in pure Python with no C extensions.
|
||||
|
||||
The array API spec is designed as a "minimal API subset" and explicitly allows
|
||||
libraries to include behaviors not specified by it. But users of this module
|
||||
that intend to write portable code should be aware that only those behaviors
|
||||
that are listed in the spec are guaranteed to be implemented across libraries.
|
||||
Consequently, the NumPy implementation was chosen to be both conforming and
|
||||
minimal, so that users can use this implementation of the array API namespace
|
||||
and be sure that behaviors that it defines will be available in conforming
|
||||
namespaces from other libraries.
|
||||
|
||||
A few notes about the current state of this submodule:
|
||||
|
||||
- There is a test suite that tests modules against the array API standard at
|
||||
https://github.com/data-apis/array-api-tests. The test suite is still a work
|
||||
in progress, but the existing tests pass on this module, with a few
|
||||
exceptions:
|
||||
|
||||
- DLPack support (see https://github.com/data-apis/array-api/pull/106) is
|
||||
not included here, as it requires a full implementation in NumPy proper
|
||||
first.
|
||||
|
||||
The test suite is not yet complete, and even the tests that exist are not
|
||||
guaranteed to give a comprehensive coverage of the spec. Therefore, when
|
||||
reviewing and using this submodule, you should refer to the standard
|
||||
documents themselves. There are some tests in numpy.array_api.tests, but
|
||||
they primarily focus on things that are not tested by the official array API
|
||||
test suite.
|
||||
|
||||
- There is a custom array object, numpy.array_api.Array, which is returned by
|
||||
all functions in this module. All functions in the array API namespace
|
||||
implicitly assume that they will only receive this object as input. The only
|
||||
way to create instances of this object is to use one of the array creation
|
||||
functions. It does not have a public constructor on the object itself. The
|
||||
object is a small wrapper class around numpy.ndarray. The main purpose of it
|
||||
is to restrict the namespace of the array object to only those dtypes and
|
||||
only those methods that are required by the spec, as well as to limit/change
|
||||
certain behavior that differs in the spec. In particular:
|
||||
|
||||
- The array API namespace does not have scalar objects, only 0-D arrays.
|
||||
Operations on Array that would create a scalar in NumPy create a 0-D
|
||||
array.
|
||||
|
||||
- Indexing: Only a subset of indices supported by NumPy are required by the
|
||||
spec. The Array object restricts indexing to only allow those types of
|
||||
indices that are required by the spec. See the docstring of the
|
||||
numpy.array_api.Array._validate_indices helper function for more
|
||||
information.
|
||||
|
||||
- Type promotion: Some type promotion rules are different in the spec. In
|
||||
particular, the spec does not have any value-based casting. The spec also
|
||||
does not require cross-kind casting, like integer -> floating-point. Only
|
||||
those promotions that are explicitly required by the array API
|
||||
specification are allowed in this module. See NEP 47 for more info.
|
||||
|
||||
- Functions do not automatically call asarray() on their input, and will not
|
||||
work if the input type is not Array. The exception is array creation
|
||||
functions, and Python operators on the Array object, which accept Python
|
||||
scalars of the same type as the array dtype.
|
||||
|
||||
- All functions include type annotations, corresponding to those given in the
|
||||
spec (see _typing.py for definitions of some custom types). These do not
|
||||
currently fully pass mypy due to some limitations in mypy.
|
||||
|
||||
- Dtype objects are just the NumPy dtype objects, e.g., float64 =
|
||||
np.dtype('float64'). The spec does not require any behavior on these dtype
|
||||
objects other than that they be accessible by name and be comparable by
|
||||
equality, but it was considered too much extra complexity to create custom
|
||||
objects to represent dtypes.
|
||||
|
||||
- All places where the implementations in this submodule are known to deviate
|
||||
from their corresponding functions in NumPy are marked with "# Note:"
|
||||
comments.
|
||||
|
||||
Still TODO in this module are:
|
||||
|
||||
- DLPack support for numpy.ndarray is still in progress. See
|
||||
https://github.com/numpy/numpy/pull/19083.
|
||||
|
||||
- The copy=False keyword argument to asarray() is not yet implemented. This
|
||||
requires support in numpy.asarray() first.
|
||||
|
||||
- Some functions are not yet fully tested in the array API test suite, and may
|
||||
require updates that are not yet known until the tests are written.
|
||||
|
||||
- The spec is still in an RFC phase and may still have minor updates, which
|
||||
will need to be reflected here.
|
||||
|
||||
- Complex number support in array API spec is planned but not yet finalized,
|
||||
as are the fft extension and certain linear algebra functions such as eig
|
||||
that require complex dtypes.
|
||||
|
||||
"""
|
||||
__array_api_version__ = ...
|
||||
__all__ = ["__array_api_version__"]
|
||||
__all__ += ["e", "inf", "nan", "pi"]
|
||||
__all__ += ["asarray", "arange", "empty", "empty_like", "eye", "from_dlpack", "full", "full_like", "linspace", "meshgrid", "ones", "ones_like", "tril", "triu", "zeros", "zeros_like"]
|
||||
__all__ += ["astype", "broadcast_arrays", "broadcast_to", "can_cast", "finfo", "iinfo", "result_type"]
|
||||
__all__ += ["int8", "int16", "int32", "int64", "uint8", "uint16", "uint32", "uint64", "float32", "float64", "bool"]
|
||||
__all__ += ["abs", "acos", "acosh", "add", "asin", "asinh", "atan", "atan2", "atanh", "bitwise_and", "bitwise_left_shift", "bitwise_invert", "bitwise_or", "bitwise_right_shift", "bitwise_xor", "ceil", "cos", "cosh", "divide", "equal", "exp", "expm1", "floor", "floor_divide", "greater", "greater_equal", "isfinite", "isinf", "isnan", "less", "less_equal", "log", "log1p", "log2", "log10", "logaddexp", "logical_and", "logical_not", "logical_or", "logical_xor", "multiply", "negative", "not_equal", "positive", "pow", "remainder", "round", "sign", "sin", "sinh", "square", "sqrt", "subtract", "tan", "tanh", "trunc"]
|
||||
__all__ += ["take"]
|
||||
__all__ += ["linalg"]
|
||||
__all__ += ["matmul", "tensordot", "matrix_transpose", "vecdot"]
|
||||
__all__ += ["concat", "expand_dims", "flip", "permute_dims", "reshape", "roll", "squeeze", "stack"]
|
||||
__all__ += ["argmax", "argmin", "nonzero", "where"]
|
||||
__all__ += ["unique_all", "unique_counts", "unique_inverse", "unique_values"]
|
||||
__all__ += ["argsort", "sort"]
|
||||
__all__ += ["max", "mean", "min", "prod", "std", "sum", "var"]
|
||||
__all__ += ["all", "any"]
|
476
typings/numpy/array_api/_array_object.pyi
Normal file
476
typings/numpy/array_api/_array_object.pyi
Normal file
|
@ -0,0 +1,476 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import types
|
||||
import numpy.typing as npt
|
||||
import numpy as np
|
||||
from enum import IntEnum
|
||||
from typing import Any, Optional, TYPE_CHECKING, Tuple, Union
|
||||
from ._typing import Any, Device, Dtype, PyCapsule
|
||||
|
||||
"""
|
||||
Wrapper class around the ndarray object for the array API standard.
|
||||
|
||||
The array API standard defines some behaviors differently than ndarray, in
|
||||
particular, type promotion rules are different (the standard has no
|
||||
value-based casting). The standard also specifies a more limited subset of
|
||||
array methods and functionalities than are implemented on ndarray. Since the
|
||||
goal of the array_api namespace is to be a minimal implementation of the array
|
||||
API standard, we need to define a separate wrapper class for the array_api
|
||||
namespace.
|
||||
|
||||
The standard compliant class is only a wrapper class. It is *not* a subclass
|
||||
of ndarray.
|
||||
"""
|
||||
if TYPE_CHECKING:
|
||||
...
|
||||
class Array:
|
||||
"""
|
||||
n-d array object for the array API namespace.
|
||||
|
||||
See the docstring of :py:obj:`np.ndarray <numpy.ndarray>` for more
|
||||
information.
|
||||
|
||||
This is a wrapper around numpy.ndarray that restricts the usage to only
|
||||
those things that are required by the array API namespace. Note,
|
||||
attributes on this object that start with a single underscore are not part
|
||||
of the API specification and should only be used internally. This object
|
||||
should not be constructed directly. Rather, use one of the creation
|
||||
functions, such as asarray().
|
||||
|
||||
"""
|
||||
_array: np.ndarray[Any, Any]
|
||||
def __new__(cls, *args, **kwargs):
|
||||
...
|
||||
|
||||
def __str__(self: Array, /) -> str:
|
||||
"""
|
||||
Performs the operation __str__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __repr__(self: Array, /) -> str:
|
||||
"""
|
||||
Performs the operation __repr__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __array__(self, dtype: None | np.dtype[Any] = ...) -> npt.NDArray[Any]:
|
||||
"""
|
||||
Warning: this method is NOT part of the array API spec. Implementers
|
||||
of other libraries need not include it, and users should not assume it
|
||||
will be present in other implementations.
|
||||
|
||||
"""
|
||||
...
|
||||
|
||||
def __abs__(self: Array, /) -> Array:
|
||||
"""
|
||||
Performs the operation __abs__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __add__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __add__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __and__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __and__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __array_namespace__(self: Array, /, *, api_version: Optional[str] = ...) -> types.ModuleType:
|
||||
...
|
||||
|
||||
def __bool__(self: Array, /) -> bool:
|
||||
"""
|
||||
Performs the operation __bool__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __complex__(self: Array, /) -> complex:
|
||||
"""
|
||||
Performs the operation __complex__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __dlpack__(self: Array, /, *, stream: None = ...) -> PyCapsule:
|
||||
"""
|
||||
Performs the operation __dlpack__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __dlpack_device__(self: Array, /) -> Tuple[IntEnum, int]:
|
||||
"""
|
||||
Performs the operation __dlpack_device__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __eq__(self: Array, other: Union[int, float, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __eq__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __float__(self: Array, /) -> float:
|
||||
"""
|
||||
Performs the operation __float__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __floordiv__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __floordiv__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ge__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ge__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __getitem__(self: Array, key: Union[int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __getitem__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __gt__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __gt__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __int__(self: Array, /) -> int:
|
||||
"""
|
||||
Performs the operation __int__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __index__(self: Array, /) -> int:
|
||||
"""
|
||||
Performs the operation __index__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __invert__(self: Array, /) -> Array:
|
||||
"""
|
||||
Performs the operation __invert__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __le__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __le__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __lshift__(self: Array, other: Union[int, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __lshift__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __lt__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __lt__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __matmul__(self: Array, other: Array, /) -> Array:
|
||||
"""
|
||||
Performs the operation __matmul__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __mod__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __mod__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __mul__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __mul__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ne__(self: Array, other: Union[int, float, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ne__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __neg__(self: Array, /) -> Array:
|
||||
"""
|
||||
Performs the operation __neg__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __or__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __or__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __pos__(self: Array, /) -> Array:
|
||||
"""
|
||||
Performs the operation __pos__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __pow__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __pow__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rshift__(self: Array, other: Union[int, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rshift__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __setitem__(self, key: Union[int, slice, ellipsis, Tuple[Union[int, slice, ellipsis], ...], Array], value: Union[int, float, bool, Array], /) -> None:
|
||||
"""
|
||||
Performs the operation __setitem__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __sub__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __sub__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __truediv__(self: Array, other: Union[float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __truediv__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __xor__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __xor__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __iadd__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __iadd__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __radd__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __radd__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __iand__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __iand__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rand__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rand__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ifloordiv__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ifloordiv__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rfloordiv__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rfloordiv__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ilshift__(self: Array, other: Union[int, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ilshift__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rlshift__(self: Array, other: Union[int, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rlshift__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __imatmul__(self: Array, other: Array, /) -> Array:
|
||||
"""
|
||||
Performs the operation __imatmul__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rmatmul__(self: Array, other: Array, /) -> Array:
|
||||
"""
|
||||
Performs the operation __rmatmul__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __imod__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __imod__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rmod__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rmod__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __imul__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __imul__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rmul__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rmul__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ior__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ior__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ror__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ror__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ipow__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ipow__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rpow__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rpow__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __irshift__(self: Array, other: Union[int, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __irshift__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rrshift__(self: Array, other: Union[int, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rrshift__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __isub__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __isub__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rsub__(self: Array, other: Union[int, float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rsub__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __itruediv__(self: Array, other: Union[float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __itruediv__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rtruediv__(self: Array, other: Union[float, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rtruediv__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __ixor__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __ixor__.
|
||||
"""
|
||||
...
|
||||
|
||||
def __rxor__(self: Array, other: Union[int, bool, Array], /) -> Array:
|
||||
"""
|
||||
Performs the operation __rxor__.
|
||||
"""
|
||||
...
|
||||
|
||||
def to_device(self: Array, device: Device, /, stream: None = ...) -> Array:
|
||||
...
|
||||
|
||||
@property
|
||||
def dtype(self) -> Dtype:
|
||||
"""
|
||||
Array API compatible wrapper for :py:meth:`np.ndarray.dtype <numpy.ndarray.dtype>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
@property
|
||||
def device(self) -> Device:
|
||||
...
|
||||
|
||||
@property
|
||||
def mT(self) -> Array:
|
||||
...
|
||||
|
||||
@property
|
||||
def ndim(self) -> int:
|
||||
"""
|
||||
Array API compatible wrapper for :py:meth:`np.ndarray.ndim <numpy.ndarray.ndim>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
@property
|
||||
def shape(self) -> Tuple[int, ...]:
|
||||
"""
|
||||
Array API compatible wrapper for :py:meth:`np.ndarray.shape <numpy.ndarray.shape>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
@property
|
||||
def size(self) -> int:
|
||||
"""
|
||||
Array API compatible wrapper for :py:meth:`np.ndarray.size <numpy.ndarray.size>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
@property
|
||||
def T(self) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:meth:`np.ndarray.T <numpy.ndarray.T>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
|
||||
|
8
typings/numpy/array_api/_constants.pyi
Normal file
8
typings/numpy/array_api/_constants.pyi
Normal file
|
@ -0,0 +1,8 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
e = ...
|
||||
inf = ...
|
||||
nan = ...
|
||||
pi = ...
|
133
typings/numpy/array_api/_creation_functions.pyi
Normal file
133
typings/numpy/array_api/_creation_functions.pyi
Normal file
|
@ -0,0 +1,133 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
from typing import List, Optional, TYPE_CHECKING, Tuple, Union
|
||||
from ._typing import Array, Device, Dtype, NestedSequence, SupportsBufferProtocol
|
||||
|
||||
if TYPE_CHECKING:
|
||||
...
|
||||
def asarray(obj: Union[Array, bool, int, float, NestedSequence[bool | int | float], SupportsBufferProtocol,], /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ..., copy: Optional[Union[bool, np._CopyMode]] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.asarray <numpy.asarray>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def arange(start: Union[int, float], /, stop: Optional[Union[int, float]] = ..., step: Union[int, float] = ..., *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arange <numpy.arange>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def empty(shape: Union[int, Tuple[int, ...]], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.empty <numpy.empty>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def empty_like(x: Array, /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.empty_like <numpy.empty_like>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def eye(n_rows: int, n_cols: Optional[int] = ..., /, *, k: int = ..., dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.eye <numpy.eye>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def from_dlpack(x: object, /) -> Array:
|
||||
...
|
||||
|
||||
def full(shape: Union[int, Tuple[int, ...]], fill_value: Union[int, float], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.full <numpy.full>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def full_like(x: Array, /, fill_value: Union[int, float], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.full_like <numpy.full_like>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def linspace(start: Union[int, float], stop: Union[int, float], /, num: int, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ..., endpoint: bool = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.linspace <numpy.linspace>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def meshgrid(*arrays: Array, indexing: str = ...) -> List[Array]:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.meshgrid <numpy.meshgrid>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def ones(shape: Union[int, Tuple[int, ...]], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.ones <numpy.ones>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def ones_like(x: Array, /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.ones_like <numpy.ones_like>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def tril(x: Array, /, *, k: int = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.tril <numpy.tril>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def triu(x: Array, /, *, k: int = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.triu <numpy.triu>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def zeros(shape: Union[int, Tuple[int, ...]], *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.zeros <numpy.zeros>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def zeros_like(x: Array, /, *, dtype: Optional[Dtype] = ..., device: Optional[Device] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.zeros_like <numpy.zeros_like>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
92
typings/numpy/array_api/_data_type_functions.pyi
Normal file
92
typings/numpy/array_api/_data_type_functions.pyi
Normal file
|
@ -0,0 +1,92 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
from dataclasses import dataclass
|
||||
from typing import List, TYPE_CHECKING, Tuple, Union
|
||||
from ._typing import Dtype
|
||||
|
||||
if TYPE_CHECKING:
|
||||
...
|
||||
def astype(x: Array, dtype: Dtype, /, *, copy: bool = ...) -> Array:
|
||||
...
|
||||
|
||||
def broadcast_arrays(*arrays: Array) -> List[Array]:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.broadcast_arrays <numpy.broadcast_arrays>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def broadcast_to(x: Array, /, shape: Tuple[int, ...]) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.broadcast_to <numpy.broadcast_to>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def can_cast(from_: Union[Dtype, Array], to: Dtype, /) -> bool:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.can_cast <numpy.can_cast>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
@dataclass
|
||||
class finfo_object:
|
||||
bits: int
|
||||
eps: float
|
||||
max: float
|
||||
min: float
|
||||
smallest_normal: float
|
||||
dtype: Dtype
|
||||
...
|
||||
|
||||
|
||||
@dataclass
|
||||
class iinfo_object:
|
||||
bits: int
|
||||
max: int
|
||||
min: int
|
||||
dtype: Dtype
|
||||
...
|
||||
|
||||
|
||||
def finfo(type: Union[Dtype, Array], /) -> finfo_object:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.finfo <numpy.finfo>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def iinfo(type: Union[Dtype, Array], /) -> iinfo_object:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.iinfo <numpy.iinfo>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def isdtype(dtype: Dtype, kind: Union[Dtype, str, Tuple[Union[Dtype, str], ...]]) -> bool:
|
||||
"""
|
||||
Returns a boolean indicating whether a provided dtype is of a specified data type ``kind``.
|
||||
|
||||
See
|
||||
https://data-apis.org/array-api/latest/API_specification/generated/array_api.isdtype.html
|
||||
for more details
|
||||
"""
|
||||
...
|
||||
|
||||
def result_type(*arrays_and_dtypes: Union[Array, Dtype]) -> Dtype:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.result_type <numpy.result_type>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
30
typings/numpy/array_api/_dtypes.pyi
Normal file
30
typings/numpy/array_api/_dtypes.pyi
Normal file
|
@ -0,0 +1,30 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
int8 = ...
|
||||
int16 = ...
|
||||
int32 = ...
|
||||
int64 = ...
|
||||
uint8 = ...
|
||||
uint16 = ...
|
||||
uint32 = ...
|
||||
uint64 = ...
|
||||
float32 = ...
|
||||
float64 = ...
|
||||
complex64 = ...
|
||||
complex128 = ...
|
||||
bool = ...
|
||||
_all_dtypes = ...
|
||||
_boolean_dtypes = ...
|
||||
_real_floating_dtypes = ...
|
||||
_floating_dtypes = ...
|
||||
_complex_floating_dtypes = ...
|
||||
_integer_dtypes = ...
|
||||
_signed_integer_dtypes = ...
|
||||
_unsigned_integer_dtypes = ...
|
||||
_integer_or_boolean_dtypes = ...
|
||||
_real_numeric_dtypes = ...
|
||||
_numeric_dtypes = ...
|
||||
_dtype_categories = ...
|
||||
_promotion_table = ...
|
478
typings/numpy/array_api/_elementwise_functions.pyi
Normal file
478
typings/numpy/array_api/_elementwise_functions.pyi
Normal file
|
@ -0,0 +1,478 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
|
||||
def abs(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.abs <numpy.abs>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def acos(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arccos <numpy.arccos>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def acosh(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arccosh <numpy.arccosh>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def add(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.add <numpy.add>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def asin(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arcsin <numpy.arcsin>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def asinh(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arcsinh <numpy.arcsinh>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def atan(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arctan <numpy.arctan>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def atan2(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arctan2 <numpy.arctan2>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def atanh(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.arctanh <numpy.arctanh>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def bitwise_and(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.bitwise_and <numpy.bitwise_and>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def bitwise_left_shift(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.left_shift <numpy.left_shift>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def bitwise_invert(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.invert <numpy.invert>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def bitwise_or(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.bitwise_or <numpy.bitwise_or>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def bitwise_right_shift(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.right_shift <numpy.right_shift>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def bitwise_xor(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.bitwise_xor <numpy.bitwise_xor>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def ceil(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.ceil <numpy.ceil>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def conj(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.conj <numpy.conj>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def cos(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.cos <numpy.cos>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def cosh(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.cosh <numpy.cosh>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def divide(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.divide <numpy.divide>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def equal(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.equal <numpy.equal>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def exp(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.exp <numpy.exp>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def expm1(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.expm1 <numpy.expm1>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def floor(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.floor <numpy.floor>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def floor_divide(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.floor_divide <numpy.floor_divide>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def greater(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.greater <numpy.greater>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def greater_equal(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.greater_equal <numpy.greater_equal>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def imag(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.imag <numpy.imag>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def isfinite(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.isfinite <numpy.isfinite>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def isinf(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.isinf <numpy.isinf>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def isnan(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.isnan <numpy.isnan>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def less(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.less <numpy.less>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def less_equal(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.less_equal <numpy.less_equal>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def log(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.log <numpy.log>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def log1p(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.log1p <numpy.log1p>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def log2(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.log2 <numpy.log2>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def log10(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.log10 <numpy.log10>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def logaddexp(x1: Array, x2: Array) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.logaddexp <numpy.logaddexp>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def logical_and(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.logical_and <numpy.logical_and>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def logical_not(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.logical_not <numpy.logical_not>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def logical_or(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.logical_or <numpy.logical_or>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def logical_xor(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.logical_xor <numpy.logical_xor>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def multiply(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.multiply <numpy.multiply>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def negative(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.negative <numpy.negative>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def not_equal(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.not_equal <numpy.not_equal>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def positive(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.positive <numpy.positive>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def pow(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.power <numpy.power>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def real(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.real <numpy.real>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def remainder(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.remainder <numpy.remainder>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def round(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.round <numpy.round>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def sign(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.sign <numpy.sign>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def sin(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.sin <numpy.sin>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def sinh(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.sinh <numpy.sinh>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def square(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.square <numpy.square>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def sqrt(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.sqrt <numpy.sqrt>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def subtract(x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.subtract <numpy.subtract>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def tan(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.tan <numpy.tan>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def tanh(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.tanh <numpy.tanh>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def trunc(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.trunc <numpy.trunc>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
14
typings/numpy/array_api/_indexing_functions.pyi
Normal file
14
typings/numpy/array_api/_indexing_functions.pyi
Normal file
|
@ -0,0 +1,14 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
|
||||
def take(x: Array, indices: Array, /, *, axis: Optional[int] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.take <numpy.take>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
71
typings/numpy/array_api/_manipulation_functions.pyi
Normal file
71
typings/numpy/array_api/_manipulation_functions.pyi
Normal file
|
@ -0,0 +1,71 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
from typing import List, Optional, Tuple, Union
|
||||
|
||||
def concat(arrays: Union[Tuple[Array, ...], List[Array]], /, *, axis: Optional[int] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.concatenate <numpy.concatenate>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def expand_dims(x: Array, /, *, axis: int) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.expand_dims <numpy.expand_dims>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def flip(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.flip <numpy.flip>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def permute_dims(x: Array, /, axes: Tuple[int, ...]) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.transpose <numpy.transpose>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def reshape(x: Array, /, shape: Tuple[int, ...], *, copy: Optional[Bool] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.reshape <numpy.reshape>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def roll(x: Array, /, shift: Union[int, Tuple[int, ...]], *, axis: Optional[Union[int, Tuple[int, ...]]] = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.roll <numpy.roll>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def squeeze(x: Array, /, axis: Union[int, Tuple[int, ...]]) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.squeeze <numpy.squeeze>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def stack(arrays: Union[Tuple[Array, ...], List[Array]], /, *, axis: int = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.stack <numpy.stack>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
39
typings/numpy/array_api/_searching_functions.pyi
Normal file
39
typings/numpy/array_api/_searching_functions.pyi
Normal file
|
@ -0,0 +1,39 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
from typing import Optional, Tuple
|
||||
|
||||
def argmax(x: Array, /, *, axis: Optional[int] = ..., keepdims: bool = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.argmax <numpy.argmax>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def argmin(x: Array, /, *, axis: Optional[int] = ..., keepdims: bool = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.argmin <numpy.argmin>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def nonzero(x: Array, /) -> Tuple[Array, ...]:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.nonzero <numpy.nonzero>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def where(condition: Array, x1: Array, x2: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.where <numpy.where>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
54
typings/numpy/array_api/_set_functions.pyi
Normal file
54
typings/numpy/array_api/_set_functions.pyi
Normal file
|
@ -0,0 +1,54 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
from typing import NamedTuple
|
||||
|
||||
class UniqueAllResult(NamedTuple):
|
||||
values: Array
|
||||
indices: Array
|
||||
inverse_indices: Array
|
||||
counts: Array
|
||||
...
|
||||
|
||||
|
||||
class UniqueCountsResult(NamedTuple):
|
||||
values: Array
|
||||
counts: Array
|
||||
...
|
||||
|
||||
|
||||
class UniqueInverseResult(NamedTuple):
|
||||
values: Array
|
||||
inverse_indices: Array
|
||||
...
|
||||
|
||||
|
||||
def unique_all(x: Array, /) -> UniqueAllResult:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def unique_counts(x: Array, /) -> UniqueCountsResult:
|
||||
...
|
||||
|
||||
def unique_inverse(x: Array, /) -> UniqueInverseResult:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def unique_values(x: Array, /) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.unique <numpy.unique>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
22
typings/numpy/array_api/_sorting_functions.pyi
Normal file
22
typings/numpy/array_api/_sorting_functions.pyi
Normal file
|
@ -0,0 +1,22 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
|
||||
def argsort(x: Array, /, *, axis: int = ..., descending: bool = ..., stable: bool = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.argsort <numpy.argsort>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def sort(x: Array, /, *, axis: int = ..., descending: bool = ..., stable: bool = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.sort <numpy.sort>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
31
typings/numpy/array_api/_statistical_functions.pyi
Normal file
31
typings/numpy/array_api/_statistical_functions.pyi
Normal file
|
@ -0,0 +1,31 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
from typing import Optional, TYPE_CHECKING, Tuple, Union
|
||||
from ._typing import Dtype
|
||||
|
||||
if TYPE_CHECKING:
|
||||
...
|
||||
def max(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array:
|
||||
...
|
||||
|
||||
def mean(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array:
|
||||
...
|
||||
|
||||
def min(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array:
|
||||
...
|
||||
|
||||
def prod(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., dtype: Optional[Dtype] = ..., keepdims: bool = ...) -> Array:
|
||||
...
|
||||
|
||||
def std(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., correction: Union[int, float] = ..., keepdims: bool = ...) -> Array:
|
||||
...
|
||||
|
||||
def sum(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., dtype: Optional[Dtype] = ..., keepdims: bool = ...) -> Array:
|
||||
...
|
||||
|
||||
def var(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., correction: Union[int, float] = ..., keepdims: bool = ...) -> Array:
|
||||
...
|
||||
|
39
typings/numpy/array_api/_typing.pyi
Normal file
39
typings/numpy/array_api/_typing.pyi
Normal file
|
@ -0,0 +1,39 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from typing import Any, Literal, Protocol, TypeVar, Union
|
||||
from numpy import dtype, float32, float64, int16, int32, int64, int8, uint16, uint32, uint64, uint8
|
||||
|
||||
"""
|
||||
This file defines the types for type annotations.
|
||||
|
||||
These names aren't part of the module namespace, but they are used in the
|
||||
annotations in the function signatures. The functions in the module are only
|
||||
valid for inputs that match the given type annotations.
|
||||
"""
|
||||
__all__ = ["Array", "Device", "Dtype", "SupportsDLPack", "SupportsBufferProtocol", "PyCapsule"]
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
class NestedSequence(Protocol[_T_co]):
|
||||
def __getitem__(self, key: int, /) -> _T_co | NestedSequence[_T_co]:
|
||||
...
|
||||
|
||||
def __len__(self, /) -> int:
|
||||
...
|
||||
|
||||
|
||||
|
||||
Device = Literal["cpu"]
|
||||
Dtype = dtype[Union[int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64,]]
|
||||
if sys.version_info >= (3, 12):
|
||||
...
|
||||
else:
|
||||
...
|
||||
PyCapsule = Any
|
||||
class SupportsDLPack(Protocol):
|
||||
def __dlpack__(self, /, *, stream: None = ...) -> PyCapsule:
|
||||
...
|
||||
|
||||
|
||||
|
23
typings/numpy/array_api/_utility_functions.pyi
Normal file
23
typings/numpy/array_api/_utility_functions.pyi
Normal file
|
@ -0,0 +1,23 @@
|
|||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from ._array_object import Array
|
||||
from typing import Optional, Tuple, Union
|
||||
|
||||
def all(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.all <numpy.all>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
||||
def any(x: Array, /, *, axis: Optional[Union[int, Tuple[int, ...]]] = ..., keepdims: bool = ...) -> Array:
|
||||
"""
|
||||
Array API compatible wrapper for :py:func:`np.any <numpy.any>`.
|
||||
|
||||
See its docstring for more information.
|
||||
"""
|
||||
...
|
||||
|
200
typings/numpy/array_api/linalg.pyi
Normal file
200
typings/numpy/array_api/linalg.pyi
Normal file
|
@ -0,0 +1,200 @@
|
|||
"""
|
||||
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']
|
Loading…
Add table
Add a link
Reference in a new issue