[Numpy-discussion] RE: default axis for numarray

Konrad Hinsen hinsen at cnrs-orleans.fr
Wed Jun 12 07:56:04 CDT 2002


> The comparison operators could be defined to operate on the
> magnitudes only.  In this case you would get the kind of ugly
> result that two complex numbers with the same magnitude but
> different phases would be equal.

If you want to compare magnitudes, you can do that explicitly without
much effort.

> How do you sort an array of complex numbers if you can't compare them?

You could for example sort by real part first and by imaginary part
second. That would be a well-defined sort order, but not a useful
definition of comparison in the mathematical sense.

Konrad
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------




More information about the Numpy-discussion mailing list