[Numpy-discussion] Complex comparisions

Travis Oliphant oliphant.travis at ieee.org
Wed Jun 12 12:03:21 CDT 2002


I'd be interested to know what IDL does?  Does it compare complex
numbers.

Matlab allows comparisons of complex numbers but just compares the real
part.  I think this is reasonable.  Often during a calculation of
limited precision one ends up with a complex number when the result is
in a "mathematically pure sense" real.  

I guess I trust the user to realize that if they are comparing numbers
they know what they mean --- (only real numbers are compared so the
complex part is ignored).  


-Travis












More information about the Numpy-discussion mailing list