_histograms_impl.pyi 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. from collections.abc import Sequence
  2. from typing import (
  3. Literal as L,
  4. Any,
  5. SupportsIndex,
  6. TypeAlias,
  7. )
  8. from numpy._typing import (
  9. NDArray,
  10. ArrayLike,
  11. )
  12. __all__ = ["histogram", "histogramdd", "histogram_bin_edges"]
  13. _BinKind: TypeAlias = L[
  14. "stone",
  15. "auto",
  16. "doane",
  17. "fd",
  18. "rice",
  19. "scott",
  20. "sqrt",
  21. "sturges",
  22. ]
  23. def histogram_bin_edges(
  24. a: ArrayLike,
  25. bins: _BinKind | SupportsIndex | ArrayLike = ...,
  26. range: None | tuple[float, float] = ...,
  27. weights: None | ArrayLike = ...,
  28. ) -> NDArray[Any]: ...
  29. def histogram(
  30. a: ArrayLike,
  31. bins: _BinKind | SupportsIndex | ArrayLike = ...,
  32. range: None | tuple[float, float] = ...,
  33. density: bool = ...,
  34. weights: None | ArrayLike = ...,
  35. ) -> tuple[NDArray[Any], NDArray[Any]]: ...
  36. def histogramdd(
  37. sample: ArrayLike,
  38. bins: SupportsIndex | ArrayLike = ...,
  39. range: Sequence[tuple[float, float]] = ...,
  40. density: None | bool = ...,
  41. weights: None | ArrayLike = ...,
  42. ) -> tuple[NDArray[Any], tuple[NDArray[Any], ...]]: ...