2.1 Numerical Python (NumPy)

21Python in SC2.1 Numerical Python (NumPy) 2.1.2 NumPy: making float, int, complex arrays >>> a = zeros (3) >>> print a . dtype # a ’s data type float64 >>> a = zeros (3 , int ) >>> print a , a . dtype [0 0 0] int64 ( or int32 , depending on a r c h i t e c t u r e ) >>> a = zeros (3 , float32 ) # single precision >>> print a [ 0. 0. 0 ... ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download