133 lines
4.2 KiB
Python
133 lines
4.2 KiB
Python
"""
|
|
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.
|
|
"""
|
|
...
|
|
|