Skip to content

Commit 6970b4c

Browse files
committed
Make fill_as_missing the default
1 parent 05f76b7 commit 6970b4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/datasets/zarr.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ to_zarrtype, zopen, Compressor
44
struct ZarrDataset
55
g::ZGroup
66
end
7-
ZarrDataset(g::String;mode="r") = ZarrDataset(zopen(g,mode))
7+
ZarrDataset(g::String;mode="r") = ZarrDataset(zopen(g,mode,fill_as_missing=true))
88

99
get_var_dims(ds::ZarrDataset,name) = reverse(ds[name].attrs["_ARRAY_DIMENSIONS"])
1010
get_varnames(ds::ZarrDataset) = collect(keys(ds.g.arrays))
@@ -21,7 +21,7 @@ end
2121
function add_var(p::ZarrDataset, T::Type, varname, s, dimnames, attr;
2222
chunksize=s, kwargs...)
2323
attr2 = merge(attr,Dict("_ARRAY_DIMENSIONS"=>reverse(collect(dimnames))))
24-
za = zcreate(T, p.g, varname,s...;attrs=attr2,chunks=chunksize,kwargs...)
24+
za = zcreate(T, p.g, varname,s...;fill_as_missing=true,attrs=attr2,chunks=chunksize,kwargs...)
2525
za
2626
end
2727

0 commit comments

Comments
 (0)