You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importnumpyasnpimporth5pyf=h5py.File('new.h5', 'a')
# single dimensione=f.create_dataset('e', shape=10,dtype=[('a', int), ('b', float, 6)])
# workse['b'] ==np.empty((10, 6), dtype=float)
# workse['b'] =e['b']
# multi dimensiond=f.create_dataset('d', shape=10,dtype=[('a', int), ('b', float, (2,3))])
# worksd[0] =np.empty(1, dtype=[('a', int), ('b', float, (2,3))])
# ValueError: When changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.d['b'] =d['b']
# ValueError: When changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.d['b'] =np.empty((10, 2, 3), dtype=float)
# ValueError: When changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.d['b', 0] =np.empty((2, 3), dtype=float)
# ValueError: When changing to a larger dtype, its size must be a divisor of the total size in bytes of the last axis of the array.d['b', 0] =d['b', 0]
numpy doesn't have this problem
The text was updated successfully, but these errors were encountered: