Polish reproject/merge docstrings and cover Inf/chunk_size/max_memory cases#1461
Merged
brendancol merged 1 commit intomainfrom May 4, 2026
Merged
Polish reproject/merge docstrings and cover Inf/chunk_size/max_memory cases#1461brendancol merged 1 commit intomainfrom
brendancol merged 1 commit intomainfrom
Conversation
…ses (#1459) Spell out the chunk_size default behavior in both reproject() and merge() docstrings (512 for the standard dask path, 2048 for the streaming and dask+cupy paths). Add short Examples blocks to both to match the rest of the subpackage. Add tests for previously uncovered cases: - reproject on input containing +/-Inf must not crash. - chunk_size as a tuple propagates to the dask output chunks. - max_memory accepts human-readable strings ('256MB', '1GB'). - max_memory accepts integer byte counts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1459.
Summary
chunk_size=Nonedefault in bothreproject()andmerge(): 512 for the standard dask path, 2048 for the in-memory streaming and dask+cupy paths.Examplesblocks toreproject()andmerge()so the two main entry points match the rest of the subpackage.test_reproject_handles_inf_input: reproject must not crash on +/-Inf pixels.test_reproject_chunk_size_tuple: tuple form ofchunk_sizeis exercised on a dask input and asserted against the output chunks.test_reproject_max_memory_string_arg:'256MB'and'1GB'are accepted.test_reproject_max_memory_int_arg: integer byte count is accepted.No behavior change in the implementation; only docstrings and tests.
Test plan
pytest xrspatial/tests/test_reproject.py -xpasses (184 passed locally).