Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit 0fb192a

Browse files
authored
Merge pull request #180 from clouds56/patch-2
add rand and np.nan*
2 parents c3019d9 + b34e6b9 commit 0fb192a

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

numpy-stubs/__init__.pyi

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ def arange(range_: int, dtype: Type[_DType]) -> ndarray[_DType]: ...
517517
def arange(range_: float) -> ndarray[float64]: ...
518518
def ascontiguousarray(a: Any, dtype: Optional[Type[_DType]] = ...) -> ndarray: ...
519519
def copy(a: Any, order: Optional[str] = ...) -> ndarray: ...
520+
def cumsum(
521+
a: ndarray[_DType], axis: Optional[int] = ..., dtype: Optional[Type[_DType]] = ...
522+
) -> ndarray[_DType]: ...
520523
def delete(
521524
arr: ndarray[_DType], object: Union[int, List[int], slice], axis: Optional[int] = ...
522525
) -> ndarray[_DType]: ...
@@ -770,11 +773,6 @@ def min(a: ndarray[_DType], axis: None = ...) -> _DType: ...
770773
@overload
771774
def min(a: ndarray[_DType], axis: _AxesType, keepdims: bool = ...) -> ndarray[_DType]: ...
772775
def minimum(a: ndarray[_DType], b: ndarray[_DType]) -> ndarray[_DType]: ...
773-
@overload
774-
def nanstd(a: ndarray[_Float]) -> _Float: ...
775-
@overload
776-
def nanstd(a: ndarray[_Float], axis: _AxesType, keepdims: bool = ...) -> ndarray[_Float]: ...
777-
def nansum(a: ndarray[_DType]) -> ndarray[_DType]: ...
778776
def nan_to_num(
779777
x: ndarray[_DType],
780778
copy: bool = ...,
@@ -887,6 +885,14 @@ def where(condition: _ConditionType, x: float, y: float) -> ndarray[float64]: ..
887885
@overload
888886
def where(condition: _ConditionType) -> Tuple[ndarray[int64], ...]: ...
889887

888+
#
889+
# nan series methods
890+
#
891+
nancumsum = cumsum
892+
nanmean = mean
893+
nanstd = std
894+
nansum = sum
895+
890896
#
891897
# Saving methods
892898
#

numpy-stubs/random.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def normal(loc: float, scale: float, size: Union[int, Tuple[int, ...]]) -> ndarr
7171
def permutation(size: int) -> ndarray[int64]: ...
7272
@overload
7373
def permutation(size: Iterable[_DType]) -> ndarray[_DType]: ...
74+
def rand(*args: int) -> ndarray[_Float]: ...
7475
def randn(*args: int) -> ndarray[_Float]: ...
7576
@overload
7677
def randint(low: int, high: int = ...) -> int64: ...

0 commit comments

Comments
 (0)