I could create the following strucutured array in numpy:
dt = np.dtype([('n', 'i4'),('x', 'f8'), ('y', 'f8'), ('z', 'f8')])
arr = np.array((1, 5.0, 6.0, 7.0))
This creates the array:
array((1, 5., 6., 7.), dtype=[('n', '<i4'), ('x', '<f8'), ('y', '<f8'), ('z', '<f8')])
In dt the last three columns are all floats f8 is there a shorter way to declare dt when there are multiple consecutive columns of the same type?
dt = np.dtype([('n', 'i4'), *zip('xyz', ['f8']*3)])?