[SciPy-user] numarray complex comparisons

Tim Hochberg tim.hochberg at ieee.org
Wed Dec 11 16:00:06 EST 2002


I wrote:
[Tim H]
[...]
> So, I'm +0.5 on always providing '.real', but not '.imag' (-1 until shown
it
> can work reasonably).
>
> > +0.5 for functions real() and imag().
> +1 here.

I just realized that imag() suffers from the same problem as ".imag" unless
both real and imag always provide a copy (inefficient) or we can make imag()
return a read only array somehow. (I'm opposed to sometimes returning a copy
and sometimes not -- that's evil).

So now I'm +1 for real(), imag() with imag(a) returning something read only
when a is not complex. And +0.5 for .real, .imag with a.imag returning
something read-only when a is not complex.

-tim





More information about the SciPy-User mailing list