[Numpy-discussion] Assigning complex values to a real array
Dr. Phillip M. Feldman
pfeldman at verizon.net
Wed Dec 9 20:51:03 EST 2009
Pauli Virtanen-3 wrote:
>
> I'd think that downcasting is different from dropping the imaginary part.
>
There are many ways (in fact, an unlimited number) to downcast from complex
to real. Here are three possibilities:
- Take the real part.
- Take the magnitude (root-mean-square of the real and imaginary parts).
- Assign a NaN.
--
View this message in context: http://old.nabble.com/Assigning-complex-values-to-a-real-array-tp22383353p26720961.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.
More information about the NumPy-Discussion
mailing list