Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions recipes/recipes_emscripten/zarr/test_import_zarr.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
def test_import_zarr():
import zarr

def test_create_array():
import zarr
zarr.config.set({'async.concurrency': 1, 'threading.max_workers': 0})
import numpy as np
z = zarr.zeros((100, 100), chunks=(10, 10), dtype='f4')
# This only writes to 1 chunk out of 100!
z[0:10, 0:10] = 1
# This only reads 1 chunk
slice_data = z[0:10, 0:10]
assert np.all(slice_data == 1)
Loading