-
Notifications
You must be signed in to change notification settings - Fork 6
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
raise error for invalid scale factors #73
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@giovp thank you for the contribution! 👏 Overall looks good, CI is failing due handling of the dimensions (it may help to use the dict identifier for dimensions). Thanks for taking a look at the chunk size issue. Yes, we can look at the chunk size issue as a follow-up. It may be at reduced scales that the chunk sizes need to be reduced to be at most the shape of the reduced array (I think this could be done during multiscale generation automatically when required). |
@thewtex I believe the test now fails cause time
is this desirable or shall I exclude |
yes, please 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
cross ref from here scverse/spatialdata#110
@thewtex here a
ValueError
is raised but please let me know if you think a logging or just a warning should be raised instead.I tried to make dask fail with invalid chunk sizes as described here: scverse/spatialdata#110 (comment) I think I understood what you mean but I didn't manage to make a reprex with couple of resizing methods (
Methods.XARRAY_COARSEN
andMethods.DASK_IMAGE_NEAREST
). Basically even if I pass larger-than-axes chunks the method would still bound to the max value for that dimension, I'll try a bit more later. On a separate note, should this check happen at inferred chunk sizes from the passedchunks
and 1image.shape` or should it happen after the resizing already completed (before returning the DataTree). Thank you!