> Either we should:
> 
>    1. Just change it, and hope no one is broken by it
>    2. Add a dtype argument:
>       - If dtype=None, behave like np.histogram
>       - If dtype is not specified, emit a future warning recommending to
>       use dtype=None or dtype=float
>       - In future, change the default to None
>    3. Create a new better-named function histogram_nd, which can also be
>    created without the mistake that is
>    https://github.com/numpy/numpy/issues/10864.
> 
> Thoughts?

I like the option 2.

By the way, we (@ESRF) re-developped many times histogram and
histogram_nd in various projects in order to have a better consistency
on the one hand and better performances on the other (re-written in C
or C++).

I noticed a noticeable gain in performance in the last years of numpy
but I did not check consistency. The issue is that every bin should be
an interval open on the right-hand side which causes stability issues
depending as the smallest value greater than the max depend on the
input dtype.
For example the smallest value greater than 10 is 11
in int but 10.000001 in float32 and 10.000000000000002 in float64.

Cheers,
-- 
Jérôme Kieffer

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

Reply via email to