np_datetime.pyi 596 B

123456789101112131415161718192021
  1. import numpy as np
  2. from pandas._typing import npt
  3. class OutOfBoundsDatetime(ValueError): ...
  4. class OutOfBoundsTimedelta(ValueError): ...
  5. # only exposed for testing
  6. def py_get_unit_from_dtype(dtype: np.dtype): ...
  7. def py_td64_to_tdstruct(td64: int, unit: int) -> dict: ...
  8. def astype_overflowsafe(
  9. arr: np.ndarray,
  10. dtype: np.dtype,
  11. copy: bool = ...,
  12. round_ok: bool = ...,
  13. is_coerce: bool = ...,
  14. ) -> np.ndarray: ...
  15. def is_unitless(dtype: np.dtype) -> bool: ...
  16. def compare_mismatched_resolutions(
  17. left: np.ndarray, right: np.ndarray, op
  18. ) -> npt.NDArray[np.bool_]: ...