def test_vlen(self): a = np.array([np.arange(3), np.arange(4)], dtype=h5t.vlen_dtype(int)) self.f.attrs['a'] = a self.assertArrayEqual(self.f.attrs['a'][0], a[0])
def test_vlen(): vt_n = h5t.vlen_dtype(np.dtype('<i2')) vt_h = h5t.py_create(vt_n, logical=True) assert datatypes.fmt_dtype(vt_h) == 'vlen array of int16'