-
-
Notifications
You must be signed in to change notification settings - Fork 368
update release note for dtype refactor #3229
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ba2ad18
update release note for dtype refactor
d-v-b 80d6679
public API for getting the zarr v3 name
d-v-b be3e51a
clarify that to_json(zarr_format=3) might return a string
d-v-b a236e1b
Merge branch 'main' into update-2874-release-note
d-v-b 9bf0d14
Merge branch 'main' into update-2874-release-note
d-v-b 29aa8eb
Merge branch 'main' into update-2874-release-note
d-v-b 5fe67d5
Merge branch 'main' into update-2874-release-note
d-v-b File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,19 @@ | ||
| Adds zarr-specific data type classes. This replaces the internal use of numpy data types for zarr | ||
| v2 and a fixed set of string enums for zarr v3. This change is largely internal, but it does | ||
| change the type of the ``dtype`` and ``data_type`` fields on the ``ArrayV2Metadata`` and | ||
| ``ArrayV3Metadata`` classes. It also changes the JSON metadata representation of the | ||
| variable-length string data type, but the old metadata representation can still be | ||
| used when reading arrays. The logic for automatically choosing the chunk encoding for a given data | ||
| type has also changed, and this necessitated changes to the ``config`` API. | ||
| Adds zarr-specific data type classes. | ||
|
|
||
| This change adds a ``ZDType`` base class for Zarr V2 and Zarr V3 data types. Child classes are | ||
| defined for each NumPy data type. Each child class defines routines for ``JSON`` serialization. | ||
| New data types can be created and registered dynamically. | ||
|
|
||
| Prior to this change, Zarr Python had two streams for handling data types. For Zarr V2 arrays, | ||
| we used NumPy data type identifiers. For Zarr V3 arrays, we used a fixed set of string enums. Both | ||
| of these systems proved hard to extend. | ||
|
|
||
| This change is largely internal, but it does change the type of the ``dtype`` and ``data_type`` | ||
| fields on the ``ArrayV2Metadata`` and ``ArrayV3Metadata`` classes. Previously, ``ArrayV2Metadata.dtype`` | ||
| was a NumPy ``dtype`` object, and ``ArrayV3Metadata.data_type`` was an internally-defined ``enum``. | ||
| After this change, both ``ArrayV2Metadata.dtype`` and ``ArrayV3Metadata.data_type`` are instances of | ||
| ``ZDType``. A NumPy data type can be generated from a ``ZDType`` via the ``ZDType.to_native_dtype()`` | ||
| method. The internally-defined Zarr V3 ``enum`` class is gone entirely, but the ``ZDType._zarr_v3_name`` | ||
| attribute contains the string value previously associated with that ``enum``. | ||
|
|
||
| For more on this new feature, see the `documentation </user-guide/data_types.html>`_ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.