-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Labels
topic: Complex Data TypesComplex number data types.Complex number data types.
Milestone
Description
Originally discussed in #153 (comment).
In order to add complex support to sign, we need to agree on the definition for complex numbers.
NumPy uses sqrt(z^2)/z while an arguably more common convention is x/|x|.
For paths forward we have 3 options:
- Use NumPy's definition.
- Use the more common convention used elsewhere (MATLAB, Julia, etc).
- Not support complex numbers in
sign.
Questions
- If we choose (2), given NumPy's potential v2 release, would NumPy be willing to introduce this breaking change?
See Also
- Add numpy.phase in addition to numpy.angle numpy/numpy#3621
- Ufuncs for complex numbers numpy/numpy#13179
- MATLAB: https://www.mathworks.com/help/matlab/ref/sign.html
- Julia: https://docs.julialang.org/en/v1/base/math/#Base.sign
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic: Complex Data TypesComplex number data types.Complex number data types.