8000 DOC: Improve ``np.histogram`` docs (#25404) · numpy/numpy@8385ba3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8385ba3

Browse files
authored
DOC: Improve np.histogram docs (#25404)
Add note to the weight parameter description describing the relationship between the weight dtype and the returned dtype
1 parent 2cc2112 commit 8385ba3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

numpy/lib/_histograms_impl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,8 @@ def histogram(a, bins=10, range=None, density=None, weights=None):
711711
(instead of 1). If `density` is True, the weights are
712712
normalized, so that the integral of the density over the range
713713
remains 1.
714+
Please note that the ``dtype`` of `weights` will dictate the
715+
``dtype`` of the returned accumulator (`hist`).
714716
density : bool, optional
715717
If ``False``, the result will contain the number of samples in
716718
each bin. If ``True``, the result is the value of the

0 commit comments

Comments
 (0)
0