arrays.pyi 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. from typing import Sequence
  2. import numpy as np
  3. from pandas._typing import (
  4. AxisInt,
  5. DtypeObj,
  6. Self,
  7. Shape,
  8. )
  9. class NDArrayBacked:
  10. _dtype: DtypeObj
  11. _ndarray: np.ndarray
  12. def __init__(self, values: np.ndarray, dtype: DtypeObj) -> None: ...
  13. @classmethod
  14. def _simple_new(cls, values: np.ndarray, dtype: DtypeObj): ...
  15. def _from_backing_data(self, values: np.ndarray): ...
  16. def __setstate__(self, state): ...
  17. def __len__(self) -> int: ...
  18. @property
  19. def shape(self) -> Shape: ...
  20. @property
  21. def ndim(self) -> int: ...
  22. @property
  23. def size(self) -> int: ...
  24. @property
  25. def nbytes(self) -> int: ...
  26. def copy(self, order=...): ...
  27. def delete(self, loc, axis=...): ...
  28. def swapaxes(self, axis1, axis2): ...
  29. def repeat(self, repeats: int | Sequence[int], axis: int | None = ...): ...
  30. def reshape(self, *args, **kwargs): ...
  31. def ravel(self, order=...): ...
  32. @property
  33. def T(self): ...
  34. @classmethod
  35. def _concat_same_type(
  36. cls, to_concat: Sequence[Self], axis: AxisInt = ...
  37. ) -> Self: ...