Skip to content

ENH: angle: add delegation - #968

Open
ushnah wants to merge 2 commits into
data-apis:mainfrom
ushnah:angle
Open

ENH: angle: add delegation#968
ushnah wants to merge 2 commits into
data-apis:mainfrom
ushnah:angle

Conversation

@ushnah

@ushnah ushnah commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Add support for angle

towards gh-100

@lucascolley lucascolley changed the title ENH: add angle ENH: angle: add delegation Sep 7, 2026
@lucascolley lucascolley added enhancement New feature or request delegation labels Sep 7, 2026
@lucascolley lucascolley added this to the 0.11.3 milestone Sep 7, 2026
@lucascolley
lucascolley self-requested a review September 7, 2026 12:58

@lucascolley lucascolley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @ushnah ! Please see https://data-apis.org/array-api-extra/contributing.html#delegation for further steps we need to take here. Let me know if you have any questions

@lucascolley lucascolley modified the milestones: 0.11.3, 0.11.5 Sep 7, 2026
@lucascolley
lucascolley self-requested a review September 9, 2026 01:51
Comment on lines +54 to +57
# Torch treats real negative zero as positive zero, unlike atan2(0, z).
if _compat.is_torch_namespace(xp) and xp.isdtype(z.dtype, "complex floating"):
result = xp.angle(z)
return result * 180 / xp.pi if deg else result

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting, this is something to report to data-apis/array-api#595... @NeilGirdhar any initial thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants