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

2024-01-04 Thread Marten van Kerkwijk
Hi All, Thanks for the comments on complex sign - it seems there is good support for it. On copysign, currently it is not supported for complex values at all. I think given the responses so far, it looks like we should just keep it like that; although my extension was fairly logical, I cannot

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

2024-01-04 Thread Dom Grigonis
I think this suggestion regarding sign is solid. From both theoretical and practical points of view. And agree with all of Aaron’s points as well. Regards, DG > On 4 Jan 2024, at 22:58, Robert Kern wrote: > > On Wed, Jan 3, 2024 at 4:09 PM Aaron Meurer > wrote: >

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

2024-01-04 Thread Robert Kern
On Wed, Jan 3, 2024 at 4:09 PM Aaron Meurer wrote: > sign(z) = z/|z| is a fairly standard definition. See > https://oeis.org/wiki/Sign_function and > https://en.wikipedia.org/wiki/Sign_function. It's also implemented > this way in MATLAB and Mathematica (see >