Skip to content

Allow raster aggregation when labels have no background - #1349

Open
ZuolinCheng wants to merge 1 commit into
scverse:mainfrom
ZuolinCheng:r5-46-issue-1230
Open

ZuolinCheng wants to merge 1 commit into
scverse:mainfrom
ZuolinCheng:r5-46-issue-1230

Conversation

@ZuolinCheng

Copy link
Copy Markdown

Compare zonal statistics against the input labels after excluding background, whether label 0 occurs or not.

Fixes #1230

Verification

Seven focused raster aggregation cases passed, including inputs with and without background and multiscale inputs. Eight downstream alignment and labels-to-circles checks passed with synchronous Dask, and six cases skipped.

Coding and test assistance used OpenAI Codex (GPT-6.2 Sol). Claude Opus 5.5 and Gemini 4 Hydrogen assisted with independent review.

@codecov

codecov Bot commented Dec 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.77%. Comparing base (d1458f3) to head (33d4617).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1349   +/-   ##
=======================================
  Coverage   91.77%   91.77%           
=======================================
  Files          53       53           
  Lines        8398     8398           
=======================================
  Hits         7707     7707           
  Misses        691      691           
Files with missing lines Coverage Δ
src/spatialdata/_core/operations/aggregate.py 95.21% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

aggregate(image, by=labels) crashes when the labels have no background (no zero pixels)

1 participant