-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
API extensionAdds new functions or objects to the API.Adds new functions or objects to the API.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.
Milestone
Description
This RFC requests to include a new API in the array API specification for the purpose of computing the argument of a complex number.
Overview
Based on array comparison data, the API is available in the majority of libraries in the PyData ecosystem.
The Array API specification does not currently include an API for computing the argument of a complex number.
Prior art
- NumPy: https://numpy.org/doc/stable/reference/generated/numpy.angle.html
- PyTorch: https://pytorch.org/docs/stable/generated/torch.angle.html
- TensorFlow: https://www.tensorflow.org/api_docs/python/tf/math/angle
- C99: https://en.cppreference.com/w/c/numeric/complex/carg
Proposal:
def angle(x: array, /) -> array
Questions
- okay with
angle
as name? arg? phase? - only operate on complex arrays, similar to
conj
et al?
cc @kgryte
Metadata
Metadata
Assignees
Labels
API extensionAdds new functions or objects to the API.Adds new functions or objects to the API.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.