Skip to content

perf: welford's algorithm for mean-var aggregation#4147

Open
ilan-gold wants to merge 3 commits into
mainfrom
ig/welford
Open

perf: welford's algorithm for mean-var aggregation#4147
ilan-gold wants to merge 3 commits into
mainfrom
ig/welford

Conversation

@ilan-gold

Copy link
Copy Markdown
Contributor

From discussions with @zboldyga.

This should then in theory be reused with #4143 instead of its custom moments calculation

  • Closes #
  • Tests included or not required because:

@ilan-gold ilan-gold added this to the 1.12.2 milestone Jun 8, 2026
@ilan-gold ilan-gold changed the title perf: welford's algorithm for mean-var perf: welford's algorithm for mean-var aggregation Jun 8, 2026
out[cat, col] += data.data[j]


@njit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make these nogil or provide an option for fau to provide nogil njit

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.60%. Comparing base (0ac3337) to head (48230af).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4147      +/-   ##
==========================================
- Coverage   79.61%   79.60%   -0.02%     
==========================================
  Files         120      120              
  Lines       12786    12780       -6     
==========================================
- Hits        10180    10173       -7     
- Misses       2606     2607       +1     
Flag Coverage Δ
hatch-test.low-vers 78.84% <100.00%> (-0.01%) ⬇️
hatch-test.pre 79.43% <100.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/get/_aggregated.py 92.66% <100.00%> (-0.65%) ⬇️
src/scanpy/get/_kernels.py 100.00% <ø> (ø)

@ilan-gold ilan-gold requested a review from flying-sheep June 8, 2026 12:24
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