Access real and imaginary parts of mx.complex64 #1331
Answered
by
angeloskath
louisamand
asked this question in
Q&A
-
It seems it is not yet implemented (#361), but is there a workaround that doesn't force a conversion to NumPy ? |
Beta Was this translation helpful? Give feedback.
Answered by
angeloskath
Aug 15, 2024
Replies: 1 comment 1 reply
-
We should implement that for sure! In the meantime the following should work well def real(x):
return mx.view(x, mx.float32)[..., ::2]
def imag(x):
return mx.view(x, mx.float32)[..., 1::2] |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
louisamand
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should implement that for sure! In the meantime the following should work well