I have an Structured array like this:
a = np.array([(0. , 1. , 2.) , (10. , 11. , 12. )] ,
dtype=[(\'PositionX\', \'
You're getting an error just because the a[i] are tuples, you can't add directly tuple. You have to access them, a more pythonic way to achieve this would be:
map(sum, zip(*a))
the zip function do exactly what you're looking for, after that you have to process each entry according to what you need, in your case sum
, you can also try this:
result = []
for elem in zip(*a):
result.append(sum(elem))