diff --git a/numpy/lib/histograms.pyi b/numpy/lib/histograms.pyi index 27b9dbcfb361..ce02718adcd5 100644 --- a/numpy/lib/histograms.pyi +++ b/numpy/lib/histograms.pyi @@ -34,16 +34,14 @@ def histogram( a: ArrayLike, bins: _BinKind | SupportsIndex | ArrayLike = ..., range: None | tuple[float, float] = ..., - normed: None = ..., - weights: None | ArrayLike = ..., density: bool = ..., + weights: None | ArrayLike = ..., ) -> 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 = ..., + weights: None | ArrayLike = ..., ) -> tuple[NDArray[Any], list[NDArray[Any]]]: ... diff --git a/numpy/lib/twodim_base.pyi b/numpy/lib/twodim_base.pyi index 120abb7e051a..1b3b94bd5cba 100644 --- a/numpy/lib/twodim_base.pyi +++ b/numpy/lib/twodim_base.pyi @@ -166,9 +166,8 @@ def histogram2d( # type: ignore[misc] y: _ArrayLikeFloat_co, bins: int | Sequence[int] = ..., range: None | _ArrayLikeFloat_co = ..., - normed: None | bool = ..., - weights: None | _ArrayLikeFloat_co = ..., density: None | bool = ..., + weights: None | _ArrayLikeFloat_co = ..., ) -> tuple[ NDArray[float64], NDArray[floating[Any]], @@ -180,9 +179,8 @@ def histogram2d( y: _ArrayLikeComplex_co, bins: int | Sequence[int] = ..., range: None | _ArrayLikeFloat_co = ..., - normed: None | bool = ..., - weights: None | _ArrayLikeFloat_co = ..., density: None | bool = ..., + weights: None | _ArrayLikeFloat_co = ..., ) -> tuple[ NDArray[float64], NDArray[complexfloating[Any, Any]], @@ -194,9 +192,8 @@ def histogram2d( y: _ArrayLikeComplex_co, bins: Sequence[_ArrayLikeInt_co], range: None | _ArrayLikeFloat_co = ..., - normed: None | bool = ..., - weights: None | _ArrayLikeFloat_co = ..., density: None | bool = ..., + weights: None | _ArrayLikeFloat_co = ..., ) -> tuple[ NDArray[float64], NDArray[Any], diff --git a/numpy/typing/tests/data/fail/histograms.pyi b/numpy/typing/tests/data/fail/histograms.pyi index ad151488dd2e..22499d39175a 100644 --- a/numpy/typing/tests/data/fail/histograms.pyi +++ b/numpy/typing/tests/data/fail/histograms.pyi @@ -7,7 +7,6 @@ AR_f8: npt.NDArray[np.float64] np.histogram_bin_edges(AR_i8, range=(0, 1, 2)) # E: incompatible type np.histogram(AR_i8, range=(0, 1, 2)) # E: incompatible type -np.histogram(AR_i8, normed=True) # E: incompatible type np.histogramdd(AR_i8, range=(0, 1)) # E: incompatible type np.histogramdd(AR_i8, range=[(0, 1, 2)]) # E: incompatible type