I normally create numpy dtypes like this:
C = np.dtype([('a',int),('b',float)])
However in my code I also use the fields a and b individually elsewhere:
A = np.dtype([('a',int)])
B = np.dtype([('b',float)])
For maintainability I'd like to derive C from types A and B somehow like this:
C = np.dtype([A,B]) # this gives a TypeError
Is there a way in numpy to create complex dtypes by combining other dtypes?