astype() behaviour

Joris De Ridder joris at ster.kuleuven.be
Mon Oct 30 06:53:32 CST 2006


On Friday 27 October 2006 19:01, Francesc Altet wrote:
   [FA]: A Divendres 27 Octubre 2006 17:58, Joris De Ridder va escriure:
   [FA]: > Hi,
   [FA]: >
   [FA]: > Is the following behaviour of astype() intentional in NumPy 1.0?
   [FA]: >
   [FA]: > >>> x = array([1,2,3])
   [FA]: > >>> x.astype(None)
   [FA]: >
   [FA]: > array([ 1.,  2.,  3.])
   [FA]: >
   [FA]: > That is, the int32 is converted to float64.
   [FA]: 
   [FA]: Yes, I think the behaviour is intended. This is because 'float64' is the 
   [FA]: default type in NumPy from some months ago (before the default was 'int_')

OK, updated the astype() example in the www.scipy.org/Numpy_Example_List .

J.


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Numpy-discussion mailing list