Skip to content

Fix complex arr.real/arr.imag on NumPy 2.5+#375

Draft
seberg wants to merge 1 commit intojax-ml:mainfrom
seberg:complex-imag
Draft

Fix complex arr.real/arr.imag on NumPy 2.5+#375
seberg wants to merge 1 commit intojax-ml:mainfrom
seberg:complex-imag

Conversation

@seberg
Copy link
Copy Markdown
Contributor

@seberg seberg commented Apr 22, 2026

This adds the new mechanism for defining .imag/.real. Admittedly, we don't actually need the full loop (and if we do more new DType things, the looping part should be a helper construct). I.e. .imag and .real itself will only ever use the resolution function here and return a view.

This is a draft as it can only be merged after gh-357 (and requires doc fixup). It also requires an update after NumPy did the necessary C-versioning bump on main (missing until now).

This adds the new mechanism for defining .imag/.real.
Admittedly, we don't actually need the full loop (and if we do more
new DType things, the looping part should be a helper construct).
I.e. `.imag` and `.real` itself will only ever use the resolution
function here and return a view.

This is a draft as it can only be merged after jax-mlgh-357 (and requires
doc fixup).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant