diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-05-24 13:35:35 +0200 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-06-11 22:15:06 +0200 |
commit | 4209558866c10eb0d528a6888b8297b405bae97e (patch) | |
tree | e1d1b469914da8f18752a25dcb6adb5d73f45a03 /numpy/core/_asarray.pyi | |
parent | c633a13496e1681d9940227af12adf9190dabeb3 (diff) | |
download | numpy-4209558866c10eb0d528a6888b8297b405bae97e.tar.gz |
MAINT: Move 4 array constructors from `np.core._asarray` to `np.core.multiarray`
Diffstat (limited to 'numpy/core/_asarray.pyi')
-rw-r--r-- | numpy/core/_asarray.pyi | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/numpy/core/_asarray.pyi b/numpy/core/_asarray.pyi index ee21fc0f1..1928cfe12 100644 --- a/numpy/core/_asarray.pyi +++ b/numpy/core/_asarray.pyi @@ -1,7 +1,7 @@ import sys from typing import TypeVar, Union, Iterable, overload -from numpy import ndarray, _OrderKACF +from numpy import ndarray from numpy.typing import ArrayLike, DTypeLike if sys.version_info >= (3, 8): @@ -11,40 +11,6 @@ else: _ArrayType = TypeVar("_ArrayType", bound=ndarray) -# TODO: The following functions are now defined in C, so should be defined -# in a (not yet existing) `multiarray.pyi`. -# (with the exception of `require`) - -def asarray( - a: object, - dtype: DTypeLike = ..., - order: _OrderKACF = ..., - *, - like: ArrayLike = ... -) -> ndarray: ... -@overload -def asanyarray( - a: _ArrayType, - dtype: None = ..., - order: _OrderKACF = ..., - *, - like: ArrayLike = ... -) -> _ArrayType: ... -@overload -def asanyarray( - a: object, - dtype: DTypeLike = ..., - order: _OrderKACF = ..., - *, - like: ArrayLike = ... -) -> ndarray: ... -def ascontiguousarray( - a: object, dtype: DTypeLike = ..., *, like: ArrayLike = ... -) -> ndarray: ... -def asfortranarray( - a: object, dtype: DTypeLike = ..., *, like: ArrayLike = ... -) -> ndarray: ... - _Requirements = Literal[ "C", "C_CONTIGUOUS", "CONTIGUOUS", "F", "F_CONTIGUOUS", "FORTRAN", |