[Numpy-discussion] Re: [SciPy-user] numarray complex comparisons
perry at stsci.edu
Mon Dec 9 08:30:02 EST 2002
Tim Hochberg write:
> What is the argument against allowing __eq__ to continue to work, while
> disallowing __lt__ and friends. The former is well defined. I
> know comparing
> floating point number for equality is a bit of a suckers game, but were
> allowing it for floats and it's sometimes useful.
> On second thought, maybe I'm just misinterpreting you here since __eq__
> works fine for complex scalars.
I wasn't clear on this. What I was arguing was that less, less_equal,
greater, greater_equal would not work, but that equal and not_equal
Primarily because that is what Python does. It does allow one
to test for equality (or non equality), but doesn't allow
for >,<,>=,<=, which is sensible in my view.
More information about the NumPy-Discussion