In Matlab there is a command to define a new numeric type for example:
numerictype(0,16,8)
see documentation: https://www.mathworks.com/help
You could use np.dtype. I used your representation of your dtype in the following snippet:
dtype
import numpy as np dtype=[('signed', np.bool_), ('word', np.int16), ('frac', np.int16)] mytype = np.dtype(dtype)
and you can use it in an array like so:
np.array([True,1,1],dtype=mytype)