vectorized.pyi 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. """
  2. For cython types that cannot be represented precisely, closest-available
  3. python equivalents are used, and the precise types kept as adjacent comments.
  4. """
  5. from datetime import tzinfo
  6. import numpy as np
  7. from pandas._libs.tslibs.dtypes import Resolution
  8. from pandas._typing import npt
  9. def dt64arr_to_periodarr(
  10. stamps: npt.NDArray[np.int64],
  11. freq: int,
  12. tz: tzinfo | None,
  13. reso: int = ..., # NPY_DATETIMEUNIT
  14. ) -> npt.NDArray[np.int64]: ...
  15. def is_date_array_normalized(
  16. stamps: npt.NDArray[np.int64],
  17. tz: tzinfo | None,
  18. reso: int, # NPY_DATETIMEUNIT
  19. ) -> bool: ...
  20. def normalize_i8_timestamps(
  21. stamps: npt.NDArray[np.int64],
  22. tz: tzinfo | None,
  23. reso: int, # NPY_DATETIMEUNIT
  24. ) -> npt.NDArray[np.int64]: ...
  25. def get_resolution(
  26. stamps: npt.NDArray[np.int64],
  27. tz: tzinfo | None = ...,
  28. reso: int = ..., # NPY_DATETIMEUNIT
  29. ) -> Resolution: ...
  30. def ints_to_pydatetime(
  31. stamps: npt.NDArray[np.int64],
  32. tz: tzinfo | None = ...,
  33. box: str = ...,
  34. reso: int = ..., # NPY_DATETIMEUNIT
  35. ) -> npt.NDArray[np.object_]: ...
  36. def tz_convert_from_utc(
  37. stamps: npt.NDArray[np.int64],
  38. tz: tzinfo | None,
  39. reso: int = ..., # NPY_DATETIMEUNIT
  40. ) -> npt.NDArray[np.int64]: ...