Skip to content

Test aspect Inf and all-NaN elevation input across backends (#3439)#3440

Merged
brendancol merged 1 commit into
xarray-contrib:mainfrom
brendancol:deep-sweep-test-coverage-aspect-2026-06-21
Jun 21, 2026
Merged

Test aspect Inf and all-NaN elevation input across backends (#3439)#3440
brendancol merged 1 commit into
xarray-contrib:mainfrom
brendancol:deep-sweep-test-coverage-aspect-2026-06-21

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Closes #3439.

Adds coverage for two Cat-2 inputs the aspect suite never exercised:

  • Inf / -Inf elevation cells. Asserts the planar output never contains Inf, and that numpy / cupy / dask+numpy / dask+cupy agree on the result.
  • All-NaN raster. Asserts aspect / northness / eastness return all-NaN with the shape preserved, on all four backends.

Both behaviors are defined and consistent across backends today, so these tests pin the current contract rather than fixing a bug. Test-only, no source change.

Validated locally on a CUDA host: all 16 new tests pass on all four backends, and the full test_aspect.py is green (225 passed).

…ontrib#3439)

Add coverage for two untested Cat-2 inputs in test_aspect.py:

- Inf / -Inf elevation cells: assert the planar output never contains
  Inf, and numpy/cupy/dask+numpy/dask+cupy agree.
- All-NaN raster: aspect/northness/eastness return all-NaN with the
  shape preserved, on all four backends.

Both behaviors are defined and consistent across backends today, so
these pin the current contract. Test-only; no source change.

Update sweep-test-coverage-state.csv aspect row.
Closes xarray-contrib#3439.
@brendancol brendancol merged commit 20d436d into xarray-contrib:main Jun 21, 2026
12 checks passed
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.

aspect/northness/eastness: no test for Inf or all-NaN elevation input

1 participant