@@ -334,10 +334,10 @@ To create a group, use the :func:`zarr.hierarchy.group` function::
334
334
335
335
>>> root_group = zarr.group()
336
336
>>> root_group
337
- zarr.hierarchy.Group(0)
338
- store: zarr.storage.MemoryStore
337
+ zarr.hierarchy.Group(/, 0)
338
+ store: zarr.storage.DictStore
339
339
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/ >`_.
341
341
For example, groups can contain other groups::
342
342
343
343
>>> foo_group = root_group.create_group('foo')
@@ -351,44 +351,44 @@ For compatibility with h5py, Zarr groups implement the
351
351
... chunks=(1000, 1000), dtype='i4',
352
352
... fill_value=0)
353
353
>>> 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)
355
355
compression: blosc; compression_opts: {'clevel': 5, 'cname': 'lz4', 'shuffle': 1}
356
356
nbytes: 381.5M; nbytes_stored: 313; ratio: 1277955.3; initialized: 0/100
357
- store: zarr.storage.MemoryStore
357
+ store: zarr.storage.DictStore
358
358
359
359
Members of a group can be accessed via the suffix notation, e.g.::
360
360
361
361
>>> root_group['foo']
362
- zarr.hierarchy.Group(foo, 1)
362
+ zarr.hierarchy.Group(/ foo, 1)
363
363
groups: 1; bar
364
- store: zarr.storage.MemoryStore
364
+ store: zarr.storage.DictStore
365
365
366
366
The '/' character can be used to access multiple levels of the hierarchy,
367
367
e.g.::
368
368
369
369
>>> root_group['foo/bar']
370
- zarr.hierarchy.Group(foo/bar, 1)
370
+ zarr.hierarchy.Group(/ foo/bar, 1)
371
371
arrays: 1; baz
372
- store: zarr.storage.MemoryStore
372
+ store: zarr.storage.DictStore
373
373
>>> 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)
375
375
compression: blosc; compression_opts: {'clevel': 5, 'cname': 'lz4', 'shuffle': 1}
376
376
nbytes: 381.5M; nbytes_stored: 313; ratio: 1277955.3; initialized: 0/100
377
- store: zarr.storage.MemoryStore
377
+ store: zarr.storage.DictStore
378
378
379
379
The :func: `zarr.hierarchy.open_group ` provides a convenient way to create or
380
380
re-open a group stored in a directory on the file-system, with sub-groups
381
381
stored in sub-directories, e.g.::
382
382
383
383
>>> persistent_group = zarr.open_group('example', mode='w')
384
384
>>> persistent_group
385
- zarr.hierarchy.Group(0)
385
+ zarr.hierarchy.Group(/, 0)
386
386
store: zarr.storage.DirectoryStore
387
387
>>> z = persistent_group.create_dataset('foo/bar/baz', shape=(10000, 10000),
388
388
... chunks=(1000, 1000), dtype='i4',
389
389
... fill_value=0)
390
390
>>> 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)
392
392
compression: blosc; compression_opts: {'clevel': 5, 'cname': 'lz4', 'shuffle': 1}
393
393
nbytes: 381.5M; nbytes_stored: 313; ratio: 1277955.3; initialized: 0/100
394
394
store: zarr.storage.DirectoryStore
@@ -472,7 +472,7 @@ Here is an example storing an array directly into a Zip file::
472
472
store: zarr.storage.ZipStore
473
473
>>> import os
474
474
>>> os.path.getsize('example.zip')
475
- 30828
475
+ 30838
476
476
477
477
Re-open and check that data have been written::
478
478
0 commit comments