N5 (zarr.n5)

This module contains a storage class and codec to support the N5 format.

class zarr.n5.N5Store(path)

Storage class using directories and files on a standard file system, following the N5 format (https://github.com/saalfeldlab/n5).

Parameters:
path : string

Location of directory to use as the root of the storage hierarchy.

Notes

This is an experimental feature.

Safe to write in multiple threads or processes.

Examples

Store a single array:

>>> import zarr
>>> store = zarr.N5Store('data/array.n5')
>>> z = zarr.zeros((10, 10), chunks=(5, 5), store=store, overwrite=True)
>>> z[...] = 42

Store a group:

>>> store = zarr.N5Store('data/group.n5')
>>> root = zarr.group(store=store, overwrite=True)
>>> foo = root.create_group('foo')
>>> bar = foo.zeros('bar', shape=(10, 10), chunks=(5, 5))
>>> bar[...] = 42