[SciPy-Dev] views and mask NA

Pierre Haessig pierre.haessig@crans....
Thu Jan 26 07:44:02 CST 2012

Le 21/01/2012 20:49, Benjamin Root a écrit :
> Consider making an assignment first to the real part, and then to the 
> imaginary part, the second assignment would wipe out the first (if we 
> want to be consistent).
Charles case is pretty tricky and I may be confused. However, I don't 
see why "the 2nd assignment should wipe out the 1st".

Indeed, considering with start with C = NA (complex)

1)  When assigning the real part of C to some value, the mask indeed 
should be clear (if we assume this operation zeroes the imaginary part, 
which would make sense)
2) When assigning the imaginary part to some value, C is no more masked 
and there should be indeed no need to clear the real part.

I'm assuming here it is easy to access & set separately the real/im part 
of a complex number. However, I pretty much unaware of complex number 
memory representation...
If this separate access is not easy, then I would question the ability 
to have a real/im part view on complex data.


More information about the SciPy-Dev mailing list