93 lines
2.1 KiB
Python
93 lines
2.1 KiB
Python
|
|
"""
|
||
|
|
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.
|
||
|
|
"""
|
||
|
|
...
|
||
|
|
|