Skip to content
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

Add keepdims options to reader classes to avoid squeezing singleton dims #521

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

scottstanie
Copy link
Collaborator

@scottstanie scottstanie commented Jan 3, 2025

Slices like slice(n, n+1) currently get squeezed out of the RasterReader and RasterStackReader classes.

TBD: if we should make the default keepdims=True, or make the default the same as current behavior with keepdims=False.
I have made the default keepdims=True, since, in dolphin, we are really using these dataset readers in the context of block-based processing. There are more headaches involved with a dimension accidentally dropping out than having an extra singleton dimension. Since we're adding this as an init option, there's still the ability to squeeze out dimensions if desired for other purposes.

@scottstanie scottstanie marked this pull request as ready for review January 3, 2025 20:27
@scottstanie scottstanie merged commit ea163cc into isce-framework:main Jan 7, 2025
3 of 5 checks passed
@scottstanie scottstanie deleted the add-keepdims-readers branch January 7, 2025 02:43
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.

1 participant