Skip to content

Commit 2e0fff5

Browse files
committed
fix tutorial hierarchy examples
1 parent 759acab commit 2e0fff5

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/tutorial.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,10 @@ To create a group, use the :func:`zarr.hierarchy.group` function::
334334

335335
>>> root_group = zarr.group()
336336
>>> root_group
337-
zarr.hierarchy.Group(0)
338-
store: zarr.storage.MemoryStore
337+
zarr.hierarchy.Group(/, 0)
338+
store: zarr.storage.DictStore
339339

340-
Groups have a similar API to the Group class from `h5py <http://TODO>`_.
340+
Groups have a similar API to the Group class from `h5py <http://www.h5py.org/>`_.
341341
For example, groups can contain other groups::
342342

343343
>>> foo_group = root_group.create_group('foo')
@@ -351,44 +351,44 @@ For compatibility with h5py, Zarr groups implement the
351351
... chunks=(1000, 1000), dtype='i4',
352352
... fill_value=0)
353353
>>> z
354-
zarr.core.Array(foo/bar/baz, (10000, 10000), int32, chunks=(1000, 1000), order=C)
354+
zarr.core.Array(/foo/bar/baz, (10000, 10000), int32, chunks=(1000, 1000), order=C)
355355
compression: blosc; compression_opts: {'clevel': 5, 'cname': 'lz4', 'shuffle': 1}
356356
nbytes: 381.5M; nbytes_stored: 313; ratio: 1277955.3; initialized: 0/100
357-
store: zarr.storage.MemoryStore
357+
store: zarr.storage.DictStore
358358

359359
Members of a group can be accessed via the suffix notation, e.g.::
360360

361361
>>> root_group['foo']
362-
zarr.hierarchy.Group(foo, 1)
362+
zarr.hierarchy.Group(/foo, 1)
363363
groups: 1; bar
364-
store: zarr.storage.MemoryStore
364+
store: zarr.storage.DictStore
365365

366366
The '/' character can be used to access multiple levels of the hierarchy,
367367
e.g.::
368368

369369
>>> root_group['foo/bar']
370-
zarr.hierarchy.Group(foo/bar, 1)
370+
zarr.hierarchy.Group(/foo/bar, 1)
371371
arrays: 1; baz
372-
store: zarr.storage.MemoryStore
372+
store: zarr.storage.DictStore
373373
>>> root_group['foo/bar/baz']
374-
zarr.core.Array(foo/bar/baz, (10000, 10000), int32, chunks=(1000, 1000), order=C)
374+
zarr.core.Array(/foo/bar/baz, (10000, 10000), int32, chunks=(1000, 1000), order=C)
375375
compression: blosc; compression_opts: {'clevel': 5, 'cname': 'lz4', 'shuffle': 1}
376376
nbytes: 381.5M; nbytes_stored: 313; ratio: 1277955.3; initialized: 0/100
377-
store: zarr.storage.MemoryStore
377+
store: zarr.storage.DictStore
378378

379379
The :func:`zarr.hierarchy.open_group` provides a convenient way to create or
380380
re-open a group stored in a directory on the file-system, with sub-groups
381381
stored in sub-directories, e.g.::
382382

383383
>>> persistent_group = zarr.open_group('example', mode='w')
384384
>>> persistent_group
385-
zarr.hierarchy.Group(0)
385+
zarr.hierarchy.Group(/, 0)
386386
store: zarr.storage.DirectoryStore
387387
>>> z = persistent_group.create_dataset('foo/bar/baz', shape=(10000, 10000),
388388
... chunks=(1000, 1000), dtype='i4',
389389
... fill_value=0)
390390
>>> z
391-
zarr.core.Array(foo/bar/baz, (10000, 10000), int32, chunks=(1000, 1000), order=C)
391+
zarr.core.Array(/foo/bar/baz, (10000, 10000), int32, chunks=(1000, 1000), order=C)
392392
compression: blosc; compression_opts: {'clevel': 5, 'cname': 'lz4', 'shuffle': 1}
393393
nbytes: 381.5M; nbytes_stored: 313; ratio: 1277955.3; initialized: 0/100
394394
store: zarr.storage.DirectoryStore
@@ -472,7 +472,7 @@ Here is an example storing an array directly into a Zip file::
472472
store: zarr.storage.ZipStore
473473
>>> import os
474474
>>> os.path.getsize('example.zip')
475-
30828
475+
30838
476476

477477
Re-open and check that data have been written::
478478

0 commit comments

Comments
 (0)