Skip to content

Conversation

TomNicholas
Copy link
Member

@norlandrhagen this is in theory all that would be needed. But when I actually run it I hit some bugs. e.g.

TypeError: Cannot convert object None with type <class 'NoneType'> to a scalar compatible with the data type Int16(endianness='little').
  • Closes Virtualize Native Zarr V2 format #565
  • Tests added
  • Tests passing
  • Full type hint coverage
  • Changes are documented in docs/releases.rst
  • New functions/methods are listed in api.rst
  • New functionality has documentation

Comment on lines +88 to +90
from zarr.metadata.migrate_v3 import _convert_array_metadata

return _convert_array_metadata(zarr_array.metadata)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fyi @d-v-b I think this is the piece of API from zarr-developers/zarr-python#3257 that we would ideally like to be exposed as public and stable in zarr-python.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that function will probably need some time to stabilize but in general 💯 to making it public

@d-v-b
Copy link

d-v-b commented Sep 24, 2025

TypeError: Cannot convert object None with type <class 'NoneType'> to a scalar compatible with the data type Int16(endianness='little').

That's a symptom of converting a V2 array which had fill_value: null to v3, where the fill value can't be null. You can handle this case by using the default fill value, which is associated with the data type via default_scalar method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Virtualize Native Zarr V2 format

2 participants