_philox.pyi 1005 B

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