On Fri, Dec 22, 2023 at 12:34 PM Martin Ling <martin-nu...@earth.li> wrote:
> Hi folks, > > I don't follow numpy development in much detail these days but I see > that there is a 2.0 release planned soon. > > Would this be an opportunity to change the behaviour of 'reduceat'? > > This issue has been open in some form since 2006! > https://github.com/numpy/numpy/issues/834 > > The current behaviour was originally inherited from Numeric, and makes > reduceat often unusable in practice, even where it should be the > perfect, concise, efficient solution. But it has been impossible to > change it without breaking compatibіlity with existing code. > > As a result, horrible hacks are needed instead, e.g. my answer here: > https://stackoverflow.com/questions/57694003 > > Is this something that could finally be fixed in 2.0? The reduceat API is certainly problematic, but I don't think fixing it is really a NumPy 2.0 thing. As discussed in that issue, the right way to fix that is to add a new API with the correct behavior, and then we can think about deprecating (and maybe eventually removing) the current reduceat method. If the new reducebins() method were available, I would say removing reduceat() would be appropriate to consider for NumPy 2, but we don't have the new method with fixed behavior yet, which is the bigger blocker. > > > Martin > _______________________________________________ > NumPy-Discussion mailing list -- numpy-discussion@python.org > To unsubscribe send an email to numpy-discussion-le...@python.org > https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ > Member address: sho...@gmail.com >
_______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com