[Numpy-discussion] Re: Fixing definition of reduceat for Numpy 2.0?

2023-12-22 Thread Marten van Kerkwijk
Hi Martin, I agree it is a long-standing issue, and I was reminded of it by your comment. I have a draft PR at https://github.com/numpy/numpy/pull/25476 that does not change the old behaviour, but allows you to pass in a start-stop array which behaves more sensibly (exact API TBD). Please have

[Numpy-discussion] Re: Fixing definition of reduceat for Numpy 2.0?

2023-12-22 Thread Stephan Hoyer
On Fri, Dec 22, 2023 at 12:34 PM Martin Ling 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

[Numpy-discussion] Fixing definition of reduceat for Numpy 2.0?

2023-12-22 Thread Martin Ling
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

[Numpy-discussion] updated 2.0-dev nightlies, including macOS Accelerate wheels

2023-12-22 Thread Ralf Gommers
Hi all, We had some issues with nightlies, the macOS, Linux aarch64 and PyPy ones were about a month out of date. That is fixed now, new nightlies for all supported platforms are up on https://anaconda.org/scientific-python-nightly-wheels/numpy. Note that a lot changed in `main` over the last

[Numpy-discussion] Re: Change definition of complex sign (and use it in copysign)

2023-12-22 Thread Oscar Benjamin
On Fri, 22 Dec 2023 at 13:25, wrote: > > Anyway, to me the main question would be whether this would break any > workflows (though it is hard to see how it could, given that the previous > definition was really rather useless...). SymPy already defines sign(z) as z/abs(z) (with sign(0) = 0) as

[Numpy-discussion] Re: Change definition of complex sign (and use it in copysign)

2023-12-22 Thread Neal Becker
In my opinion, with the caveat that anyone that asks for the sign of a complex number gets what they deserve, this seems about as useful a definition as any. On Fri, Dec 22, 2023 at 8:23 AM wrote: > Hi All, > > A long-standing, small wart in numpy has been that the definition of sign > for

[Numpy-discussion] Change definition of complex sign (and use it in copysign)

2023-12-22 Thread mhvk
Hi All, A long-standing, small wart in numpy has been that the definition of sign for complex numbers is really useless (`np.sign(z)` gives the sign of the real component, unless that is zero, in which case it gives the sign of the imaginary component, in both cases as a complex number with