File tree Expand file tree Collapse file tree 1 file changed +5
-14
lines changed
Expand file tree Collapse file tree 1 file changed +5
-14
lines changed Original file line number Diff line number Diff line change 22import copy
33import itertools
44import fsspec .asyn
5- from packaging .version import Version
65from typing import Any , cast
76import warnings
87
1312import zarr .storage
1413
1514
15+ def dict_to_store (store_dict : dict ):
16+ """Create an in memory zarr store backed by the given dictionary"""
17+ return zarr .storage .MemoryStore (read_only = False , store_dict = store_dict )
18+
19+
1620def refs_as_fs (
1721 refs ,
1822 fs = None ,
@@ -50,19 +54,6 @@ def refs_as_store(
5054 return fs_as_store (fss , read_only = read_only )
5155
5256
53- def is_zarr3 ():
54- """Check if the installed zarr version is version 3"""
55- return Version (zarr .__version__ ) >= Version ("3.0.0.b2" )
56-
57-
58- def dict_to_store (store_dict : dict ):
59- """Create an in memory zarr store backed by the given dictionary"""
60- if is_zarr3 ():
61- return zarr .storage .MemoryStore (read_only = False , store_dict = store_dict )
62- else :
63- return zarr .storage .KVStore (store_dict )
64-
65-
6657def fs_as_store (fs : fsspec .asyn .AsyncFileSystem , read_only = False ):
6758 """Open the refs as a zarr store
6859
You can’t perform that action at this time.
0 commit comments