[SciPy-user] Real Array Expressed as Complex Array

Lorenzo Isella lorenzo.isella@gmail....
Thu Jul 3 09:39:41 CDT 2008


Dear All,
I am bit puzzled: I was plotting a (rather complicated) analytical
potential for which an analytical form is available.
When asking to print out the value of the potential at the cut-off:

print "at the cut-off, the dimensionless potential takes the value, ",
pot_ext_dimensionless[-1]

I got the following:

at the cut-off, the dimensionless potential takes the value,
(-6.48829965957e-06+0j)

Now, since the potential I am coding via a function has to be a real
function, I checked that the real part was always zero (as it should).
Since the result was that the array pot_ext_dimensionless is real, how
comes that it is expressed as a complex array (though the imaginary
part is always zero)?
It is true, however, that the potential could become complex for
certain (physically unsound) choices of some parameters.
Any suggestions?
Cheers

Lorenzo


More information about the SciPy-user mailing list