I have an array with a few record fields.
arr=np.array([[(0,1,3)]],dtype=[('A','i4'),('B','i4'),('C','u4')])
print(arr)
[[(0, 1, 3)]]
I'd like to add a new column and to get an array like this one:
arr2=np.array([[(0,1,3,0)]],dtype=[('A','i4'),('B','i4'),('C','u4'),('D','i4')])
print(arr2)
[[(0, 1, 3, 0)]]
...or to get an array like this one:
arr3=np.array([[(0,1,3)],[(11,22,33)]],dtype=[('A','i4'),('B','i4'),('C','u4')])
print(arr3)
[[( 0, 1, 3)]
[(11, 22, 33)]]
Could anybody help me with it?