diff options
Diffstat (limited to '.venv/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi')
-rw-r--r-- | .venv/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi b/.venv/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi new file mode 100644 index 00000000..68df0b96 --- /dev/null +++ b/.venv/lib/python3.12/site-packages/numpy/typing/tests/data/reveal/histograms.pyi @@ -0,0 +1,27 @@ +import sys +from typing import Any + +import numpy as np +import numpy.typing as npt + +if sys.version_info >= (3, 11): + from typing import assert_type +else: + from typing_extensions import assert_type + +AR_i8: npt.NDArray[np.int64] +AR_f8: npt.NDArray[np.float64] + +assert_type(np.histogram_bin_edges(AR_i8, bins="auto"), npt.NDArray[Any]) +assert_type(np.histogram_bin_edges(AR_i8, bins="rice", range=(0, 3)), npt.NDArray[Any]) +assert_type(np.histogram_bin_edges(AR_i8, bins="scott", weights=AR_f8), npt.NDArray[Any]) + +assert_type(np.histogram(AR_i8, bins="auto"), tuple[npt.NDArray[Any], npt.NDArray[Any]]) +assert_type(np.histogram(AR_i8, bins="rice", range=(0, 3)), tuple[npt.NDArray[Any], npt.NDArray[Any]]) +assert_type(np.histogram(AR_i8, bins="scott", weights=AR_f8), tuple[npt.NDArray[Any], npt.NDArray[Any]]) +assert_type(np.histogram(AR_f8, bins=1, density=True), tuple[npt.NDArray[Any], npt.NDArray[Any]]) + +assert_type(np.histogramdd(AR_i8, bins=[1]), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]]) +assert_type(np.histogramdd(AR_i8, range=[(0, 3)]), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]]) +assert_type(np.histogramdd(AR_i8, weights=AR_f8), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]]) +assert_type(np.histogramdd(AR_f8, density=True), tuple[npt.NDArray[Any], list[npt.NDArray[Any]]]) |