[SciPy-user] Problems with numpy.ndarray
sbasu at physics.cornell.edu
Wed Nov 15 11:29:17 CST 2006
-----BEGIN PGP SIGNED MESSAGE-----
| I have also a problem while importing
| from numpy import Float64
| I can use only
| from numpy import float64
| can it be related to the other problem?
~ Scipy/matplotlib used to use Numeric (or numarray) as their
'numerix' backend before they switched to numpy, and there are a few
things that are different in numpy (from Numeric). The example you
gave is one; Numeric used to have a Float64 type, which got changed to
float64, so scipy.Float64 (or pylab.Float64) no longer works. I'm not
really sure if numpy ever had a Float64 type, bcause I never used it
before I had to (because of scipy).
~ While on the topic, significantly more annoying was the fact that
default behavior of certain scipy/matplotlib functions changed due to
the backend switch. For example, previously scipy.log(+ve number) or
scipy.sqrt(+ve number) used to return floating point results, while
scipy.log(-ve) or scipy.sqrt(-ve) returned the appropriate complex
(imaginary) number. After the switch, scipy.sqrt(-ve) returns 'nan'
while you have to ask for scipy.sqrt(-ve+0j) to get the proper complex
result. You need to watch out for that, too, in case you're switching
scipy/numpy versions (I know all too well, because suddenly my codes
started spewing out nonsensical results after I switched versions).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the SciPy-user