Datatypes in Numpy

import numpy as np

x = np.array([101, 202])  
print(x.dtype)        

x = np.array([11.75, 21.75]) 
print(x.dtype)            

x = np.array([1, 2], dtype=np.int64) 
print(x.dtype)                    

x = np.array([1, 2], dtype=np.complex128) 
print(x.dtype) 

No comments: