An implementation of chunked, compressed, N-dimensional arrays for Python
Functions for creating and managing hierarchical group structures. Groups provide organizational capabilities for complex datasets with multiple related arrays and enable hierarchical data organization.
def group(
store: StoreLike = None,
overwrite: bool = False,
chunk_store: StoreLike = None,
cache_attrs: bool = True,
synchronizer: Any = None,
path: str = None,
**kwargs
) -> GroupCreate or open a zarr group.
def create_group(
store: StoreLike,
path: str = None,
overwrite: bool = False,
chunk_store: StoreLike = None,
cache_attrs: bool = True,
synchronizer: Any = None,
**kwargs
) -> GroupCreate a new zarr group in specified storage.
def create_hierarchy(
path: str,
*args,
**kwargs
) -> NoneCreate a hierarchical directory structure for zarr groups.
import zarr
# Create group
grp = zarr.group()
# Add arrays to group
grp.create_array('temperature', shape=(365, 100, 100))
grp.create_array('pressure', shape=(365, 100, 100))
# Create nested groups
weather = grp.create_group('weather_data')
weather.create_array('daily_temp', shape=(365,))# Create group in storage
grp = zarr.create_group('experiment_data.zarr')
# Organize data hierarchically
raw_data = grp.create_group('raw')
processed = grp.create_group('processed')
results = grp.create_group('results')
# Add arrays at different levels
raw_data.create_array('sensor1', shape=(1000, 10))
processed.create_array('filtered', shape=(1000, 10))
results.create_array('summary', shape=(10,))Install with Tessl CLI
npx tessl i tessl/pypi-zarr