@@ -74,7 +74,7 @@ Zarr supports data compression and filters. For example, to use Blosc compressio
74
74
... "data/example-3.zarr",
75
75
... mode="w", shape=(100, 100),
76
76
... chunks=(10, 10), dtype="f4",
77
- ... compressor =zarr.codecs.BloscCodec(cname="zstd", clevel=3, shuffle=zarr.codecs.BloscShuffle.SHUFFLE )
77
+ ... compressors =zarr.codecs.BloscCodec(cname="zstd", clevel=3, shuffle=zarr.codecs.BloscShuffle.shuffle )
78
78
... )
79
79
>>> z[:, :] = np.random.random((100, 100))
80
80
>>>
@@ -101,7 +101,7 @@ Zarr allows you to create hierarchical groups, similar to directories::
101
101
>>> root = zarr.group("data/example-2.zarr")
102
102
>>> foo = root.create_group(name="foo")
103
103
>>> bar = root.create_array(
104
- ... name="bar", shape=(100, 10), chunks=(10, 10)
104
+ ... name="bar", shape=(100, 10), chunks=(10, 10), dtype="f4"
105
105
... )
106
106
>>> spam = foo.create_array(name="spam", shape=(10,), dtype="i4")
107
107
>>>
@@ -112,6 +112,7 @@ Zarr allows you to create hierarchical groups, similar to directories::
112
112
>>> # print the hierarchy
113
113
>>> root.tree()
114
114
/
115
+ ├── bar (100, 10) float32
115
116
└── foo
116
117
└── spam (10,) int32
117
118
<BLANKLINE>
@@ -130,7 +131,7 @@ using external libraries like `s3fs <https://s3fs.readthedocs.io>`_ or
130
131
131
132
>>> import s3fs # doctest: +SKIP
132
133
>>>
133
- >>> z = zarr.create_array("s3://example-bucket/foo", mode="w", shape=(100, 100), chunks=(10, 10)) # doctest: +SKIP
134
+ >>> z = zarr.create_array("s3://example-bucket/foo", mode="w", shape=(100, 100), chunks=(10, 10), dtype="f4" ) # doctest: +SKIP
134
135
>>> z[:, :] = np.random.random((100, 100)) # doctest: +SKIP
135
136
136
137
A single-file store can also be created using the the :class: `zarr.storage.ZipStore `::
0 commit comments