-
Notifications
You must be signed in to change notification settings - Fork 25
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
ZeroDivisionError in L70 of api.py #126
Comments
Thanks for sharing. Can reproduce it even more simply with target_chunks = (2, -1, 128, 128)
rechunker.rechunk(group['thetao'], target_chunks, "1000MB", tgt_mapper, temp_store=tmp_mapper) I'll investigate. |
So it looks like we can fix it with target_chunks = (2, 45, 128, 128) My impression is that we don't support the syntax |
Thanks for the wildly quick response @rabernat! Didn't realize the |
PR welcome! 😉 The check would go here: rechunker/rechunker/algorithm.py Line 68 in 46db807
Just replace the special value of -1 with the corresponding shape (i.e. swap -1 for 45 like I did above), something like new_chunks = [s if c == -1 else c for c, s in zip(chunks, shape)] |
Sounds great! I'll open up a PR. |
Hi there,
I'm having an issue when trying to rechunk a 4d zarr store. In the traceback at L70 of
algorithm.py
(70 headroom = max_mem // chunk_mem
), I'm getting the error:ZeroDivisionError: integer division or modulo by zero
.The snippet below should be a MRE.
A few notes:
ZeroDivisionError
happens on thethetao
var.headroom = max_mem // chunk_mem
calculation, somehow chunk_mem is being assigned to 0 in the above for loop.Traceback:
Results of
conda list
:Wondering if anyone has any thoughts on why this might be happening.
Thanks!
The text was updated successfully, but these errors were encountered: