Skip to content

Bugfix for writing empty array to zarr - #10506

Merged
hendrikmakait merged 3 commits into
dask:mainfrom
benrutter:main
Dec 12, 2023
Merged

hendrikmakait merged 3 commits into
dask:mainfrom
benrutter:main

Conversation

@benrutter

Copy link
Copy Markdown
Contributor

See issue for discussion- this PR extends the checks in load_store_chunk from simply "is None" to also check size is not 0. This avoids setting with index on "out" if there is no data.

@github-actions github-actions Bot added the array label Sep 12, 2023
@github-actions github-actions Bot added the needs attention It's been a while since this was pushed on. Needs attention from the owner or a maintainer. label Oct 16, 2023

@hendrikmakait hendrikmakait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@benrutter, I'm sorry for the late review! The change looks good to me. Could you also add a regression test for the reproducer in #10438 to ensure that things keep working as expected when calling to_zarr?

@benrutter

Copy link
Copy Markdown
Contributor Author

@hendrikmakait thanks for reviewing! And no worries - just committed one now.

@hendrikmakait
hendrikmakait self-requested a review December 12, 2023 16:24

@hendrikmakait hendrikmakait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @benrutter!

@hendrikmakait
hendrikmakait merged commit 6ad6edd into dask:main Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

array needs attention It's been a while since this was pushed on. Needs attention from the owner or a maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Writing zero length array to_zarr fails with ZeroDivisionError: division by zero

2 participants