_philox.pyi 978 B

123456789101112131415161718192021222324252627282930313233343536
  1. from typing import Any, TypedDict
  2. from numpy import dtype, ndarray, uint64
  3. from numpy.random.bit_generator import BitGenerator, SeedSequence
  4. from numpy._typing import _ArrayLikeInt_co
  5. class _PhiloxInternal(TypedDict):
  6. counter: ndarray[Any, dtype[uint64]]
  7. key: ndarray[Any, dtype[uint64]]
  8. class _PhiloxState(TypedDict):
  9. bit_generator: str
  10. state: _PhiloxInternal
  11. buffer: ndarray[Any, dtype[uint64]]
  12. buffer_pos: int
  13. has_uint32: int
  14. uinteger: int
  15. class Philox(BitGenerator):
  16. def __init__(
  17. self,
  18. seed: None | _ArrayLikeInt_co | SeedSequence = ...,
  19. counter: None | _ArrayLikeInt_co = ...,
  20. key: None | _ArrayLikeInt_co = ...,
  21. ) -> None: ...
  22. @property
  23. def state(
  24. self,
  25. ) -> _PhiloxState: ...
  26. @state.setter
  27. def state(
  28. self,
  29. value: _PhiloxState,
  30. ) -> None: ...
  31. def jumped(self, jumps: int = ...) -> Philox: ...
  32. def advance(self, delta: int) -> Philox: ...