I came across this gem yesterday
> >> from numpy import *
> >> R = ones((2))
> >> R[0] = R[0] * 1j
> >> R
...array([ 0., 1.])
> >> R = ones((2), 'complex')
> >> R[0] = R[0] * 1j
> >> R
array([ 0.+1.j, 1.+0.j])"
and I read that this behavior is actually intended for some reason about
how Python wants relations between types to be such that this mistake is
unavoidable.
So can we have a new abstract floating type which is a complex, but is
implemented so that the numbers where the imaginary part is zero
represent and operate on that imaginary part implicitly? By containing
all these semantics within one type, then presumably we avoid problems
with ideas relationships between types.
Best regards,
Andrew Mullhaupt
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion