[SciPy-dev] New in fastumath ~ (means conjugate on floats and complex numbers)
eric at scipy.org
Sun Feb 24 01:31:08 CST 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
> 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.
I like the idea of having a conjugate operator, but this introduces a dangerous
ambiguity. There are many times where arrays are passed around without regard
for their numeric typecode. If an integer array is passed into some function
that does a conjugate, a bit inversion occurs instead and silently produces
invalid results. Are there any other symbols available?
More information about the Scipy-dev