diff options
| author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2021-02-20 01:05:33 +0000 |
|---|---|---|
| committer | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2021-02-24 10:40:30 +0000 |
| commit | 2e92a52bc523cf9eec245c01fdea01ce12dfbf9f (patch) | |
| tree | bb567c57dc9ff2246c9fc03c13a464f84eae2fce /numpy/random | |
| parent | 7f2db304655f80aa40c5f8481959561da15d160d (diff) | |
| download | numpy-2e92a52bc523cf9eec245c01fdea01ce12dfbf9f.tar.gz | |
ENH: Add tests for RandomState
Diffstat (limited to 'numpy/random')
| -rw-r--r-- | numpy/random/mtrand.pyi | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/random/mtrand.pyi b/numpy/random/mtrand.pyi index 91c8d84a4..f088a3929 100644 --- a/numpy/random/mtrand.pyi +++ b/numpy/random/mtrand.pyi @@ -1,3 +1,4 @@ +from numpy.random.bit_generator import BitGenerator import sys from typing import Any, Callable, Dict, Literal, Optional, Sequence, Tuple, Type, Union, overload @@ -69,7 +70,7 @@ _DTypeLikeFloat64 = Union[ class RandomState: _bit_generator: BitGenerator - def __init__(self, seed: Union[None, _ArrayLikeInt_co, SeedSequence] = ...) -> None: ... + def __init__(self, seed: Union[None, _ArrayLikeInt_co, BitGenerator] = ...) -> None: ... def __repr__(self) -> str: ... def __str__(self) -> str: ... def __getstate__(self) -> Dict[str, Any]: ... @@ -113,6 +114,7 @@ class RandomState: def tomaxint(self, size: None = ...) -> int: ... # type: ignore[misc] @overload def tomaxint(self, size: _ShapeLike = ...) -> ndarray[Any, dtype[int_]]: ... + @overload def randint( # type: ignore[misc] self, low: int, @@ -149,7 +151,7 @@ class RandomState: low: _ArrayLikeInt_co, high: Optional[_ArrayLikeInt_co] = ..., size: Optional[_ShapeLike] = ..., - ) -> ndarray[Any, dtype[int64]]: ... + ) -> ndarray[Any, dtype[int_]]: ... @overload def randint( # type: ignore[misc] self, @@ -293,11 +295,11 @@ class RandomState: @overload def rand(self, *args: None) -> float: ... @overload - def rand(self, *args: Sequence[int]) -> ndarray[Any, dtype[float64]]: ... + def rand(self, *args: int) -> ndarray[Any, dtype[float64]]: ... @overload def randn(self, *args: None) -> float: ... @overload - def randn(self, *args: Sequence[int]) -> ndarray[Any, dtype[float64]]: ... + def randn(self, *args: int) -> ndarray[Any, dtype[float64]]: ... @overload def random_integers(self, low: int, high: Optional[int] = ..., size: None = ...) -> int: ... # type: ignore[misc] @overload |
