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
... since zarr doesn't support attributes that are not JSON-serializable (including numpy arrays). This can be fixed like this (I don't have time to submit a PR myself right now):
diff --git a/kerchunk/grib2.py b/kerchunk/grib2.py
index e3a927b..0aa2ee6 100644
--- a/kerchunk/grib2.py+++ b/kerchunk/grib2.py@@ -103,7 +104,10 @@ def _store_array(store, z, data, var, inline_threshold, offset, size, attr):
overwrite=True,
)
store[f"{var}/" + ".".join(["0"] * len(shape))] = ["{{u}}", offset, size]
- d.attrs.update(attr)+ d.attrs.update({+ k: v.tolist() if isinstance(v, np.ndarray) else v+ for k, v in attr.items()+ })
def scan_grib(
The text was updated successfully, but these errors were encountered:
... since zarr doesn't support attributes that are not JSON-serializable (including numpy arrays). This can be fixed like this (I don't have time to submit a PR myself right now):
The text was updated successfully, but these errors were encountered: