_mt19937.pyi 850 B

12345678910111213141516171819202122232425262728
  1. import sys
  2. from typing import Any, Union
  3. from numpy import dtype, ndarray, uint32
  4. from numpy.random.bit_generator import BitGenerator, SeedSequence
  5. from numpy.typing import _ArrayLikeInt_co
  6. if sys.version_info >= (3, 8):
  7. from typing import TypedDict
  8. else:
  9. from typing_extensions import TypedDict
  10. class _MT19937Internal(TypedDict):
  11. key: ndarray[Any, dtype[uint32]]
  12. pos: int
  13. class _MT19937State(TypedDict):
  14. bit_generator: str
  15. state: _MT19937Internal
  16. class MT19937(BitGenerator):
  17. def __init__(self, seed: Union[None, _ArrayLikeInt_co, SeedSequence] = ...) -> None: ...
  18. def _legacy_seeding(self, seed: _ArrayLikeInt_co) -> None: ...
  19. def jumped(self, jumps: int = ...) -> MT19937: ...
  20. @property
  21. def state(self) -> _MT19937State: ...
  22. @state.setter
  23. def state(self, value: _MT19937State) -> None: ...