Hi all,

unfortunately it was noticed in Issue 13604 [0] that when histogram is
given used with a specified range and the `density=True` keyword
argument out of bound values are simply discarded [1].

Discarding out of bound values makes sense when the density/normed
option is not used, since in that case event counts are reported.
However, when out of bound values exist, the probability density should
arguably not sum up to 1 anymore.

We seem to have three ways possible to continue here:

1. Call it an outright bug and fix it.
2. Add a FutureWarning, and change it later (unfortunately noisy)
3. Add a new kwarg to control what happens and a FutureWarning which
   can be silenced using the new kwarg.

(No change will ever happen if `range` or manual bin edges were not
specified.)

If all agree that there is no reasonable use case for the current
implementation, it would be tempting to simply change it, or use a
FutureWarning (unfortunately forcing users to manually calculate the
density). If there is any half-decent use case, the kwarg may be the
nicer option.

Personally, if no one finds has a use case, I am slightly tending
towards the "bug fix" option right now.

All the Best,

Sebastian


[0] https://github.com/numpy/numpy/issues/13604
[1] As mentioned in the documentation.

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to