Skip to content

Commit 2075952

Browse files
committed
make example runnable
1 parent 0d9922b commit 2075952

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/user-guide/data_types.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ Thus the JSON identifier for a Numpy-compatible data type is just the Numpy ``st
2828
>>> import zarr
2929
>>> import numpy as np
3030
>>> import json
31+
>>> store = {}
3132
>>> np_dtype = np.dtype('int64')
32-
>>> z = zarr.create_array(shape=(1,), dtype=np_dtype, zarr_format=2)
33+
>>> z = zarr.create_array(store=store, shape=(1,), dtype=np_dtype, zarr_format=2)
3334
>>> dtype_meta = json.loads(store['.zarray'].to_bytes())["dtype"]
3435
>>> assert dtype_meta == np_dtype.str # True
3536
>>> dtype_meta

0 commit comments

Comments
 (0)