Compound datatype with int, float and array of floats

Hi @ken.walker,

I slightly modified your code and it worked:

import numpy as np
import h5py

dt = np.dtype([('id', 'i4'), ('time', 'f4'), ('matrix', 'f4', (10, 2))])

with h5py.File('hdf-forum-8083.h5', mode='w') as h5f:
    h5f.create_group('/group1')
    ds = h5f.create_dataset('/group1/ds1', shape=(10,), dtype=dt)
    for i in range(0, ds.shape[0]):
        arr = np.random.rand(10, 2)
        ds[i] = (i + 1, 0.125 * (i + 1), arr)

Take care,

       Aleksandar