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
Modifying slightly, we can save to disk with z1 = zarr.open_array('/tmp/example.zarr', mode='w', shape=(10,10),fill_value=42). When we open with Zarr.jl,
julia> z1 =zopen("/tmp/example.zarr")
ZArray{Union{Missing, Float64}} of size 10 x 10
julia> z1[1:2,1:2]
2×2reshape(::Matrix{Union{Missing, Float64}}, 2, 2) with eltype Union{Missing, Float64}:missingmissingmissingmissing
Per spec & python compatibility, this should be [42 42; 42 42]. I'm not sure how hard this would be to change, but I'm happy to look into it if a PR would be welcome? I think this would also resolve #39
The text was updated successfully, but these errors were encountered:
Yeah that was a misinterpretation of the specs from my side, where I assumed that FillValues should always represent missing values. I think the fix will be simple, but I would really like to keep an option for the old behavior as a kwarg through something like fillvalueasmissing = false. because using FillValue to encode missing values is a very common use case. Of course this will be breaking, so would be good to fix in conjunction with #78 in case we make a breaking change there as well and then bump the minor version of the package.
From Zarr spec,
I think that
fill_value = null
would correspond tomissing
in Julia.Python Zarr also has the following example:
Modifying slightly, we can save to disk with
z1 = zarr.open_array('/tmp/example.zarr', mode='w', shape=(10,10),fill_value=42)
. When we open with Zarr.jl,Per spec & python compatibility, this should be [42 42; 42 42]. I'm not sure how hard this would be to change, but I'm happy to look into it if a PR would be welcome? I think this would also resolve #39
The text was updated successfully, but these errors were encountered: