File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 2
2
import pytest
3
3
4
4
from zarr .n5 import N5ChunkWrapper , N5FSStore
5
- from zarr .storage import MemoryStore
5
+ from zarr .creation import create
6
6
from numcodecs import GZip
7
7
import numpy as np
8
8
from typing import Tuple
9
9
import shutil
10
10
import json
11
- import zarr
12
11
13
12
14
13
def test_make_n5_chunk_wrapper ():
@@ -44,12 +43,8 @@ def test_partial_chunk_decode(chunk_shape: Tuple[int, ...]):
44
43
def test_dtype_decode ():
45
44
store = 'data/array.n5'
46
45
n5_store = N5FSStore (store )
47
- z = zarr .open (n5_store )
48
- z .create_dataset ("test" , shape = 100 , dtype = "u1" )
46
+ create (100 , store = n5_store )
49
47
dtype_n5 = json .loads (n5_store ["test/.zarray" ])["dtype" ]
50
48
shutil .rmtree (store )
51
- zarr_store = MemoryStore ()
52
- z = zarr .open (zarr_store )
53
- z .create_dataset ("test" , shape = 100 , dtype = "u1" )
54
- dtype_zarr = json .loads (zarr_store ["test/.zarray" ])["dtype" ]
49
+ dtype_zarr = json .loads (create (100 ).store ["test/.zarray" ])["dtype" ]
55
50
assert dtype_n5 == dtype_zarr
You can’t perform that action at this time.
0 commit comments