Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dimension_names array metadata field #162

Merged
merged 7 commits into from
Jan 23, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions docs/core/v3.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ draft.
- Boolean
- Complex
- Datetime
- Named dimensions
- Awkward arrays

See https://github.com/zarr-developers/zarr-specs/issues/89 for discussion on
Expand All @@ -196,9 +195,6 @@ draft.
solicit feedback on whether store implementation should support full unicode.
https://github.com/zarr-developers/zarr-specs/issues/56

- Should named dimensions be part of the core metadata spec?
https://github.com/zarr-developers/zarr-specs/issues/73


Document conventions
====================
Expand Down Expand Up @@ -1095,6 +1091,22 @@ The following names are optional:
specification. When the ``storage_transformers`` name is absent no storage
transformer is used, same for an empty list.

``dimension_names``
^^^^^^^^^^^^^^^^^^^

Specifies dimension names, e.g. ``["x", "y", "z"]``. If specified, must be
an array of strings with the same length as ``shape``. An unnamed dimension
is indicated by an empty string, ``""``. If ``dimension_names`` is not
specified, all dimensions are unnamed.

For compatibility with zarr implementations and applications that support
using dimension names to uniquely identify dimensions, it is recommended but
not required that all non-empty dimension names are distinct (no two
dimensions have the same non-empty name).

This specification also does not place any restrictions on the use of the
same dimension name across multiple arrays within the same zarr hierarchy,
but extensions or specific applications may do so.

All other names within the array metadata object are reserved for
future versions of this specification.
Expand All @@ -1109,6 +1121,7 @@ compressed using gzip compression prior to storage::

{
"shape": [10000, 1000],
"dimension_names": ["rows", "columns"],
"data_type": "<f8",
"chunk_grid": {
"type": "regular",
Expand Down