Re: Change return type of Histogramdd and Histogram
Nathan via NumPy-Discussion <[email protected]> Sun, 24 May 2026 07:28:53 -0600
| Newsgroups | gmane.comp.python.numeric.general |
|---|---|
| Message-ID | <CAJXewOk+-KyNSx4s-=9MZDLzExF9BTrD2H=1YR-yOG5bm=5wqw@mail.gmail.com> |
--===============6676560314088404513== Content-Type: multipart/alternative; boundary="000000000000e855d10652903e5d" --000000000000e855d10652903e5d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Do you have any responses to the arguments Ralf made back in 2018 in favor of doing nothing? This seems like something we maybe could have changed for NumPy 2.0 but no one was advocating for it so it didn=E2=80=99t change. I=E2=80=99m not sure= it makes sense to do it now without breaking consumers or unnecessarily generating warnings for currently correct uses of the functions, as Ralf argued. Add it to the pile of issues to think about for NumPy 3.0, if we ever decide to do that? On Sun, May 24, 2026 at 6:42=E2=80=AFAM Joseph Mehdiyev via NumPy-Discussio= n < [email protected]> wrote: > Currently histogramdd (and histogram2d) converts the histogram to floats > to preserve a behavior seen a decade ago. This is of course inconsistent > with the np.histogram and I think it should be changed at this point. > The fix is quite trivial, just wanted to discuss this with someone before > I open a PR. > > Best, > Joseph > > Related: > https://github.com/numpy/numpy/issues/7845 > > https://mail.python.org/archives/list/[email protected]/thread/= NIHE7UT4SDPU6KCDSMUIU2UA52PDSEIJ/ > _______________________________________________ > NumPy-Discussion mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3//lists/numpy-discussion.python.org > Member address: [email protected] > --000000000000e855d10652903e5d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">Do you have any responses to the arguments Ralf made back= in 2018 in favor of doing nothing?</div><div dir=3D"auto"><br></div><div d= ir=3D"auto">This seems like something we maybe could have changed for NumPy= 2.0 but no one was advocating for it so it didn=E2=80=99t change. I=E2=80= =99m not sure it makes sense to do it now without breaking consumers or unn= ecessarily generating warnings for currently correct uses of the functions,= as Ralf argued.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Add it = to the pile of issues to think about for NumPy 3.0, if we ever decide to do= that?</div><div dir=3D"auto"><br><div class=3D"gmail_quote gmail_quote_con= tainer" dir=3D"auto"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, May 24, = 2026 at 6:42=E2=80=AFAM Joseph Mehdiyev via NumPy-Discussion <<a href=3D= "mailto:[email protected]">[email protected]</a>> wr= ote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;= border-left:1px #ccc solid;padding-left:1ex">Currently histogramdd (and his= togram2d) converts the histogram to floats to preserve a behavior seen a de= cade ago. This is of course inconsistent with the np.histogram and I think = it should be changed at this point.<br> The fix is quite trivial, just wanted to discuss this with someone before I= open a PR.<br> <br> Best,<br> Joseph<br> <br> Related:<br> <a href=3D"https://github.com/numpy/numpy/issues/7845" rel=3D"noreferrer" t= arget=3D"_blank">https://github.com/numpy/numpy/issues/7845</a><br> <a href=3D"https://mail.python.org/archives/list/[email protected]= g/thread/NIHE7UT4SDPU6KCDSMUIU2UA52PDSEIJ/" rel=3D"noreferrer" target=3D"_b= lank">https://mail.python.org/archives/list/[email protected]/thr= ead/NIHE7UT4SDPU6KCDSMUIU2UA52PDSEIJ/</a><br> _______________________________________________<br> NumPy-Discussion mailing list -- <a href=3D"mailto:numpy-discussion@python.= org" target=3D"_blank">[email protected]</a><br> To unsubscribe send an email to <a href=3D"mailto:numpy-discussion-leave@py= thon.org" target=3D"_blank">[email protected]</a><br> <a href=3D"https://mail.python.org/mailman3//lists/numpy-discussion.python.= org" rel=3D"noreferrer" target=3D"_blank">https://mail.python.org/mailman3/= /lists/numpy-discussion.python.org</a><br> Member address: <a href=3D"mailto:[email protected]" target=3D"_blank">= [email protected]</a><br> </blockquote></div></div> --000000000000e855d10652903e5d-- --===============6676560314088404513== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ NumPy-Discussion mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/numpy-discussion.python.org Member address: [email protected] --===============6676560314088404513==--