8000 Use DtypeLike instead of Optional[dtype] in some array creation routi… · numpy/numpy-stubs@66369f9 · GitHub
[go: up one dir, main page]

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

Commit 66369f9

Browse files
authored
Use DtypeLike instead of Optional[dtype] in some array creation routines (#81)
1 parent fa6b9fd commit 66369f9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

numpy-stubs/__init__.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -466,25 +466,25 @@ def ones(
466466
) -> ndarray: ...
467467
def zeros_like(
468468
a: ArrayLike,
469-
dtype: Optional[dtype] = ...,
469+
dtype: DtypeLike = ...,
470470
order: str = ...,
471471
subok: bool = ...,
472472
shape: Optional[Union[int, Sequence[int]]] = ...,
473473
) -> ndarray: ...
474474
def ones_like(
475475
a: ArrayLike,
476-
dtype: Optional[dtype] = ...,
476+
dtype: DtypeLike = ...,
477477
order: str = ...,
478478
subok: bool = ...,
479479
shape: Optional[_ShapeLike] = ...,
480480
) -> ndarray[int]: ...
481481
def full(
482-
shape: _ShapeLike, fill_value: Any, dtype: Optional[dtype] = ..., order: str = ...
482+
shape: _ShapeLike, fill_value: Any, dtype: DtypeLike = ..., order: str = ...
483483
) -> ndarray: ...
484484
def full_like(
485485
a: ArrayLike,
486486
fill_value: Any,
487-
dtype: Optional[dtype] = ...,
487+
dtype: DtypeLike = ...,
488488
order: str = ...,
489489
subok: bool = ...,
490490
shape: Optional[_ShapeLike] = ...,
@@ -531,7 +531,7 @@ def fromfunction(function: Callable, shape: Tuple[int, int], **kwargs) -> Any: .
531531
def isscalar(element: Any) -> bool: ...
532532
def binary_repr(num: int, width: Optional[int] = ...) -> str: ...
533533
def base_repr(number: int, base: int = ..., padding: int = ...) -> str: ...
534-
def identity(n: int, dtype: Optional[dtype] = ...) -> ndarray: ...
534+
def identity(n: int, dtype: DtypeLike = ...) -> ndarray: ...
535535
def allclose(
536536
a: ArrayLike,
537537
b: ArrayLike,

0 commit comments

Comments
 (0)
0