mahalanobis() already has good backend and NaN coverage, but a few paths run untested. I probed each on a CUDA host and they all behave correctly today, so these are coverage gaps, not bugs.
- Inf / -Inf inputs. A non-finite cell in any band maps to NaN in the output and drops out of the auto-computed statistics (the
isfinite mask catches it). Nothing in the suite passes Inf, so a regression in that mask would go unnoticed. Verified identical across numpy, cupy, dask+numpy, and dask+cupy.
- all-NaN / too-few-valid-pixels. When fewer than
n_bands + 1 cells are finite, the statistics phase raises ValueError("Not enough valid pixels ..."). That branch is never exercised.
- Degenerate shapes. A 1x1 raster with provided
mean/inv_cov returns the correct distance; 1x1 with auto stats raises (too few pixels); 1xN and Nx1 strips work. None of these shapes are tested.
This is test-only work. No source changes. If a test had surfaced a bug I would have filed it separately.
mahalanobis()already has good backend and NaN coverage, but a few paths run untested. I probed each on a CUDA host and they all behave correctly today, so these are coverage gaps, not bugs.isfinitemask catches it). Nothing in the suite passes Inf, so a regression in that mask would go unnoticed. Verified identical across numpy, cupy, dask+numpy, and dask+cupy.n_bands + 1cells are finite, the statistics phase raisesValueError("Not enough valid pixels ..."). That branch is never exercised.mean/inv_covreturns the correct distance; 1x1 with auto stats raises (too few pixels); 1xN and Nx1 strips work. None of these shapes are tested.This is test-only work. No source changes. If a test had surfaced a bug I would have filed it separately.