array-api icon indicating copy to clipboard operation
array-api copied to clipboard

RFC: add `angle` for computing the argument of a complex number

Open steff456 opened this issue 2 years ago • 0 comments

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

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

steff456 avatar Feb 14 '23 22:02 steff456