File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ def write_zarr(
126126 from anndata ._io .zarr import write_zarr as anndata_write_zarr
127127
128128 from .. import __anndataversion__ , __mudataversion__ , __version__
129+
129130 zarr_format = 2
130131 if hasattr (settings , "zarr_write_format" ):
131132 zarr_format = settings .zarr_write_format
@@ -136,7 +137,12 @@ def write_zarr(
136137 elif isinstance (data , MuData ):
137138 if isinstance (store , Path ):
138139 store = str (store )
139- file = zarr .open (store , mode = "w" , zarr_format = zarr_format )
140+ zarr_format = kwargs .pop ("zarr_format" , zarr_format )
141+ try :
142+ file = zarr .open (store , mode = "w" , zarr_format = zarr_format )
143+ except TypeError :
144+ # zarr_format is not supported in this version of zarr
145+ file = zarr .open (store , mode = "w" )
140146 mdata = data
141147 write_elem (
142148 file ,
You can’t perform that action at this time.
0 commit comments