RFC: add `angle` for computing the argument of a complex number
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start with the RFC proposal and its linked NumPy, PyTorch, TensorFlow, and C99 prior art. Resolve whether the API should be named angle, arg, or phase and whether it accepts only complex arrays; done means the specification has an agreed API and behavior.
Written by the indexing model from the issue text.
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
angleas name? arg? phase? - only operate on complex arrays, similar to
conjet al?
cc @kgryte
- Dominant language
- Python
- Stars
- 281
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from data-apis/array-api
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Maintenance
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in data-apis/array-api
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100