[SciPy-dev] New in fastumath ~ (means conjugate on floats and complex numbers)
Travis Oliphant
oliphant.travis at ieee.org
Sun Feb 24 03:24:10 EST 2002
I finally realized that with a simple change we can use the unary operator on
floats and complex numbers to mean complex conjugation.
I've made the simple change in the CVS version of fastumath.
So, in scipy complex-conjugation is as simple as
~a
if a is a complex number (or a float).
The only problem is that if a is an integer it still means bitwise inversion.
Is the added convenience worth the possible confusion? The problem is that
complex conjugation happens all the time, but bitwise inversion rarely.
-Travis
More information about the SciPy-Dev
mailing list