[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 zer

[Numpy-discussion] Re: ENH: ignore_nan parameter in np.average

2023-12-23 Thread mhvk
I think the logical choice would be to allow a weighted average in the nan-functions, not to change `np.average`. In particular, I think it is bad API to add options for such exclusions; we have another open issue about infinitiy in the data, which leads to nan even with weight 0 (because `0*inf

[Numpy-discussion] Re: Bumping CPU baseline to x86-64-v2

2025-05-17 Thread mhvk
Hi Sayed, I'm a bit confused: does your suggested change mean that prre-2009 processors won't work at all, or that no use will be made of the (little) acceleration that they provided? The latter seems fine, but not working at all seems rather bad. Though I'd think that for any old processors o