HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
110 stars 39 forks source link

hsget failing when datasets contain fillvalues #119

Closed jreadey closed 1 year ago

jreadey commented 2 years ago

If the src dataset has compound dtype and fillvalues, h5py.create_dataset is failing with: "Can't implicitly convert non-string objects to strings" error.

jreadey commented 1 year ago

See commit above for an update the the aggregate branch - just added back the code to get fillvalue on hsload. Didn't see the error mentioned above (this is with h5py 3.2.1). Here's the script I used to create a test file for hsloading/hsgetting:

import h5py
import numpy as np
f = h5py.File("vfill.h5", "w")
dt = np.dtype([('value', 'f4'), ('name', 'S8')])
dset = f.create_dataset('dset', (500,500), chunks = (50,50), dtype=dt, fillvalue=fillvalue)
print("dataset created:", dset)
f.close()

The resulting file was able to round trip to HSDS and back to a file again.

jreadey commented 1 year ago

Fix is in master and on PiPy - closing.