summaryrefslogtreecommitdiff
path: root/numpy/lib/histograms.pyi
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/histograms.pyi')
-rw-r--r--numpy/lib/histograms.pyi52
1 files changed, 48 insertions, 4 deletions
diff --git a/numpy/lib/histograms.pyi b/numpy/lib/histograms.pyi
index 25a33e3ae..2ceb60793 100644
--- a/numpy/lib/histograms.pyi
+++ b/numpy/lib/histograms.pyi
@@ -1,7 +1,51 @@
-from typing import List
+from typing import (
+ Literal as L,
+ List,
+ Tuple,
+ Any,
+ SupportsIndex,
+ Sequence,
+)
+
+from numpy.typing import (
+ NDArray,
+ ArrayLike,
+)
+
+_BinKind = L[
+ "stone",
+ "auto",
+ "doane",
+ "fd",
+ "rice",
+ "scott",
+ "sqrt",
+ "sturges",
+]
__all__: List[str]
-def histogram_bin_edges(a, bins=..., range=..., weights=...): ...
-def histogram(a, bins=..., range=..., normed=..., weights=..., density=...): ...
-def histogramdd(sample, bins=..., range=..., normed=..., weights=..., density=...): ...
+def histogram_bin_edges(
+ a: ArrayLike,
+ bins: _BinKind | SupportsIndex | ArrayLike = ...,
+ range: None | Tuple[float, float] = ...,
+ weights: None | ArrayLike = ...,
+) -> NDArray[Any]: ...
+
+def histogram(
+ a: ArrayLike,
+ bins: _BinKind | SupportsIndex | ArrayLike = ...,
+ range: None | Tuple[float, float] = ...,
+ normed: None = ...,
+ weights: None | ArrayLike = ...,
+ density: bool = ...,
+) -> Tuple[NDArray[Any], NDArray[Any]]: ...
+
+def histogramdd(
+ sample: ArrayLike,
+ bins: SupportsIndex | ArrayLike = ...,
+ range: Sequence[Tuple[float, float]] = ...,
+ normed: None | bool = ...,
+ weights: None | ArrayLike = ...,
+ density: None | bool = ...,
+) -> Tuple[NDArray[Any], List[NDArray[Any]]]: ...