strc = np.zeros(3, dtype=[('x', int), ('y', float), ('z', int), ('t', 'i8')])

def fields_view(arr, fields):
    dtype2 = np.dtype({name: arr.dtype.fields[name] for name in fields})
return np.ndarray(arr.shape, dtype2, arr, 0, arr.strides)
v1 = fields_view(strc, ['x', 'z'])
v1[0] = 10, 100
v2 = fields_view(strc, ['y', 'z'])
v2[1:] = [(3.14, 7)]
v3 = fields_view(strc, ['x', 't'])
v3[1:] = [(1000, 2 ** 16)]
print(strc)
numpy: how to fill multiple fields in a structured array at once