+ 1
Can anyone help me to understand the meanings of numpy dtypes?
Can somebody tell me the meanings of int64, float64, <U6 & <U21? 1) x = np.array([1,2,3,4,5] print(x.dtype) = int64 2) y = np.array([1.1,2.2,3.3,4.4,5.5] print(y.dtype) = float64 3) z = np.array(['xyz','abc'] print(z.dtype) = <U6 4) x1 = np.array([1,2,3,'jklm'] print(x1.dtype) = <U21
2 Answers
+ 5
Sultan Shaikh ,
you can use the numpy tutorial to get a better insight of these data types. scroll down to get some samples and see the descriptions.
https://numpy.org/doc/stable/reference/arrays.dtypes.html
+ 2
The operating system allocates memory and chooses what will be stored in the allocated memory based on the data type of the variable.