-
Notifications
You must be signed in to change notification settings - Fork 17
Add default chunk shape calculation for v2 and v3 arrays #50
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: brokkoli71 <44113112+brokkoli71@users.noreply.github.com>
Co-authored-by: brokkoli71 <44113112+brokkoli71@users.noreply.github.com>
|
Maybe the dimension separator auto-detection is not needed. The implementation with listing the store seems a bit expensive for such a small feature. I think a zarr v2 array should specify the dimension separator anyway if it is not "." right? @normanrz |
Yeah, I agree. Yes, the |
|
@copilot the default chunk shape calculation should be available for v2 and v3 |
Co-authored-by: brokkoli71 <44113112+brokkoli71@users.noreply.github.com>
Co-authored-by: brokkoli71 <44113112+brokkoli71@users.noreply.github.com>
Implemented in commits a435117 and f76f7d6. Default chunk shape calculation is now available for both v2 and v3 arrays using a shared utility method. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Adds automatic chunk size calculation when chunks are not specified during array creation (~512 elements per chunk), based on JZarr's implementation. This feature is now available for both v2 and v3 arrays.
Changes
Default chunk shape calculation (v2 and v3)
chunks(v2) orchunkGrid(v3) during array creationshapeDim / (numChunks + 1)[2000, 1500]→ chunks[500, 500]Utils.calculateDefaultChunks()ensures consistency between v2 and v3V2 Implementation
dev.zarr.zarrjava.v2.ArrayMetadataBuilder.build()to calculate default chunks whenchunks == nullV3 Implementation
dev.zarr.zarrjava.v3.ArrayMetadataBuilder.build()to calculate default chunks whenchunkGrid == nullRegularChunkGridwith calculated chunk shapeDimension Separator Behavior
dimension_separatoris not specified in metadata, it defaults to.(DOT)Example usage:
The feature is backward compatible. Existing code specifying chunks or chunkGrid explicitly continues to work unchanged.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.