We both know that: "Numpy array is multidimensional array of objects of all the same type"
However, I could create a Numpy array that contains different data types as example below. Can anyone give an explain, how it could be.
import numpy as np
a = np.array([('a',1),('b',2)],dtype=[('alpha','U11'),('num','i8')])
print(a[0][1]+1)
print(len(a[0][0]))
Output:
2
1
a, and itsshape. And index by fild name