[SciPy-user] numarray complex comparisons

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Dec 11 15:47:04 EST 2002


>>>>> "PG" == Perry Greenfield <perry at stsci.edu> writes:

    PG> How about a third approach?

    PG> This is as simple as clip, is explicit about the comparison
    PG> behavior, and handles complex arrays in the manner
    PG> desired. It's true that .real doesn't currently work on
    PG> non-complex arrays, but it could, or we could add a real
    PG> function that just returns all non-complex arrays as is and
    PG> returns the real part of complex arrays.

Nice!  This means treating everything as complex.  I'm sure some might
object.  However, this is nice and along with abs and imag should be
good enough for most?  I think this would also be useful outside the
scope of choosing the right order.

cheers,
prabhu



More information about the SciPy-User mailing list