[Numpy-discussion] float32 to float64 casting

Gökhan Sever gokhansever@gmail....
Thu Nov 15 21:24:38 CST 2012


Hello,

Could someone briefly explain why are these two operations are casting my
float32 arrays to float64?

I1 (np.arange(5, dtype='float32')).dtype
O1 dtype('float32')

I2 (100000*np.arange(5, dtype='float32')).dtype
O2 dtype('float64')



I3 (np.arange(5, dtype='float32')[0]).dtype
O3 dtype('float32')

I4 (1*np.arange(5, dtype='float32')[0]).dtype
O4 dtype('float64')



Thanks.




-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20121115/ddfb3270/attachment.html 


More information about the NumPy-Discussion mailing list