On Tue, 2018-04-10 at 09:22 +0200, Jerome Kieffer wrote:
> > 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++).
> -- 
> Jérôme Kieffer

I think this was a mistake and should be fixed so option 1 is my
preference. A dtype argument might be convenient but what does that
gain over having the user do something like result.astype(np.float64) ?

Jérôme, as to performance, I have a PR that pushes histogramming code
into C here: https://github.com/numpy/numpy/pull/9910 . After it was
submitted, there was a rearrangement of the code which broke the merge
to master. I've been meaning to update the PR to get it through, but
haven't had the time.
--
John T. Goetz
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to