Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

MAINT: move things in numeric.pyi to the top-level __init__.pyi #50

Merged
merged 1 commit into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions numpy-stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ from typing import (
Any,
ByteString,
Container,
Callable,
Dict,
IO,
Iterable,
Expand Down Expand Up @@ -485,6 +486,90 @@ def zeros(
def ones(
shape: _ShapeLike, dtype: _DtypeLike = ..., order: Optional[str] = ...
) -> ndarray: ...
def zeros_like(
a: _ArrayLike,
dtype: Optional[dtype] = ...,
order: str = ...,
subok: bool = ...,
shape: Optional[Union[int, Sequence[int]]] = ...,
) -> ndarray: ...
def ones_like(
a: _ArrayLike,
dtype: Optional[dtype] = ...,
order: str = ...,
subok: bool = ...,
shape: Optional[_ShapeLike] = ...,
) -> ndarray[int]: ...
def full(
shape: _ShapeLike, fill_value: Any, dtype: Optional[dtype] = ..., order: str = ...
) -> ndarray: ...
def full_like(
a: _ArrayLike,
fill_value: Any,
dtype: Optional[dtype] = ...,
order: str = ...,
subok: bool = ...,
shape: Optional[_ShapeLike] = ...,
) -> ndarray: ...
def count_nonzero(
a: _ArrayLike, axis: Optional[Union[int, Tuple[int], Tuple[int, int]]] = ...
) -> Union[int, ndarray]: ...
def isfortran(a: ndarray) -> bool: ...
def argwhere(a: _ArrayLike) -> ndarray: ...
def flatnonzero(a: _ArrayLike) -> ndarray: ...
def correlate(a: _ArrayLike, v: _ArrayLike, mode: str = ...) -> ndarray: ...
def convolve(a: _ArrayLike, v: _ArrayLike, mode: str = ...) -> ndarray: ...
def outer(a: _ArrayLike, b: _ArrayLike, out: ndarray = ...) -> ndarray: ...
def tensordot(
a: _ArrayLike,
b: _ArrayLike,
axes: Union[
int, Tuple[int, int], Tuple[Tuple[int, int], ...], Tuple[List[int, int], ...]
] = ...,
) -> ndarray: ...
def roll(
a: _ArrayLike,
shift: Union[int, Tuple[int, ...]],
axis: Optional[Union[int, Tuple[int, ...]]] = ...,
) -> ndarray: ...
def rollaxis(a: _ArrayLike, axis: int, start: int = ...) -> ndarray: ...
def moveaxis(
a: ndarray,
source: Union[int, Sequence[int]],
destination: Union[int, Sequence[int]],
) -> ndarray: ...
def cross(
a: _ArrayLike,
b: _ArrayLike,
axisa: int = ...,
axisb: int = ...,
axisc: int = ...,
axis: Optional[int] = ...,
) -> ndarray: ...
def indices(
dimensions: Sequence[int], dtype: dtype = ..., sparse: bool = ...
) -> Union[ndarray, Tuple[ndarray, ...]]: ...
def fromfunction(function: Callable, shape: Tuple[int, int], **kwargs) -> Any: ...
def isscalar(element: Any) -> bool: ...
def binary_repr(num: int, width: Optional[int] = ...) -> str: ...
def base_repr(number: int, base: int = ..., padding: int = ...) -> str: ...
def identity(n: int, dtype: Optional[dtype] = ...) -> ndarray: ...
def allclose(
a: _ArrayLike,
b: _ArrayLike,
rtol: float = ...,
atol: float = ...,
equal_nan: bool = ...,
) -> bool: ...
def isclose(
a: _ArrayLike,
b: _ArrayLike,
rtol: float = ...,
atol: float = ...,
equal_nan: bool = ...,
) -> Union[bool_, ndarray]: ...
def array_equal(a1: _ArrayLike, a2: _ArrayLike) -> bool: ...
def array_equiv(a1: _ArrayLike, a2: _ArrayLike) -> bool: ...

# TODO(shoyer): remove when the full numpy namespace is defined
def __getattr__(name: str) -> Any: ...
111 changes: 0 additions & 111 deletions numpy-stubs/core/numeric.pyi

This file was deleted.