Skip to content

Commit

Permalink
MAINT: Minor fixes; removed unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas van Beek committed Oct 1, 2020
1 parent da2a854 commit 97c2216
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions numpy/core/_asarray.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from typing import TypeVar, Optional, Union, Iterable, Tuple, overload
from typing import TypeVar, Union, Iterable, overload

from numpy import ndarray, _OrderKACF
from numpy.typing import ArrayLike, DtypeLike
Expand Down Expand Up @@ -41,17 +41,15 @@ def asfortranarray(
a: object, dtype: DtypeLike = ..., *, like: ArrayLike = ...
) -> ndarray: ...

_Requirements = Literal["F", "C", "A", "W", "O"]
_E = Literal["E"]
_Requirements = Literal[
"C", "C_CONTIGUOUS", "CONTIGUOUS",
"F", "F_CONTIGUOUS", "FORTRAN",
"A", "ALIGNED",
"W", "WRITEABLE",
"O", "OWNDATA"
]
_E = Literal["E", "ENSUREARRAY"]

@overload
def require(
a: object,
dtype: DtypeLike = ...,
requirements: Union[_E, Iterable[Union[_E, _Requirements]]] = ...,
*,
like: ArrayLike = ...
) -> ndarray: ...
@overload
def require(
a: _ArrayType,
Expand All @@ -61,6 +59,14 @@ def require(
like: ArrayLike = ...
) -> _ArrayType: ...
@overload
def require(
a: object,
dtype: DtypeLike = ...,
requirements: Union[_E, Iterable[Union[_E, _Requirements]]] = ...,
*,
like: ArrayLike = ...
) -> ndarray: ...
@overload
def require(
a: object,
dtype: DtypeLike = ...,
Expand Down

0 comments on commit 97c2216

Please sign in to comment.