_histograms_impl.pyi 1.0 KB

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