histograms.pyi 995 B

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