-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Milestone
Description
Original comment: #265 (comment)
There is some code in from_kerchunk_refs which creates a ZArray with fill_val = np.nan as the default value which does not match the default value set in the ZArray constructor. Here are the lines where the issue occurs. This creates a mismatch between the virtual datasets produced by kerchunk and non-kerchunk readers (dmrpp and hdf).
Here is an example:
from virtualizarr.zarr import ZArray
import numpy as np
z = {"shape": (2, 3), "dtype": np.dtype("float32"), "chunks": (2, 3), "compressor": None, "filters": None, "fill_value": None, "order": "C", "zarr_format": 2}
print(ZArray(**z))
print(ZArray.from_kerchunk_refs(z))ZArray(shape=(2, 3), chunks=(2, 3), dtype=dtype('float32'), fill_value=0.0, order='C', compressor=None, filters=None, zarr_format=2)
ZArray(shape=(2, 3), chunks=(2, 3), dtype=dtype('float32'), fill_value=nan, order='C', compressor=None, filters=None, zarr_format=2)norlandrhagen
Metadata
Metadata
Assignees
Labels
No labels