Skip to content

normalize_total with numba - #3571

Merged
ilan-gold merged 21 commits into
mainfrom
normalize_total_update
May 19, 2025
Merged

normalize_total with numba#3571
ilan-gold merged 21 commits into
mainfrom
normalize_total_update

Conversation

@Intron7

@Intron7 Intron7 commented Apr 8, 2025

Copy link
Copy Markdown
Member

Fixes #3135

This also removes the deprecated functions out

@Intron7 Intron7 changed the title normalize_total for numba normalize_total with numba Apr 8, 2025
Comment on lines +93 to +97
for i in numba.prange(rows):
count = counts_per_cell[i] / target_sum
for j in range(indptr[i], indptr[i + 1]):
data[j] /= count
return counts_per_cell, target_sum, counts_per_cols

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so this part can be in fast-array-utils under the name elem_mult @flying-sheep right? This is what I understood from our discussions. Should we first implement elem_mult then come back to this issue?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Generally I wouldn’t stop scanpy improvements for fast_array_utils.

But if part of this can be replaced with a mult helper, we could do that now!

@codecov

codecov Bot commented Apr 15, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.74%. Comparing base (e6e86f2) to head (862f786).
⚠️ Report is 45 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/scanpy/preprocessing/_normalization.py 95.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3571      +/-   ##
==========================================
+ Coverage   76.68%   76.74%   +0.05%     
==========================================
  Files         113      113              
  Lines       12709    12703       -6     
==========================================
+ Hits         9746     9749       +3     
+ Misses       2963     2954       -9     
Files with missing lines Coverage Δ
src/scanpy/preprocessing/_normalization.py 89.41% <95.00%> (+9.19%) ⬆️

Co-authored-by: Philipp A. <flying-sheep@web.de>
@flying-sheep flying-sheep added this to the 1.11.2 milestone Apr 15, 2025
@flying-sheep

Copy link
Copy Markdown
Member

@Intron7 you have to write Fixes #3135 to link the issue.

@flying-sheep flying-sheep linked an issue Apr 17, 2025 that may be closed by this pull request
@flying-sheep
flying-sheep enabled auto-merge (squash) April 17, 2025 12:43
@flying-sheep
flying-sheep disabled auto-merge April 17, 2025 12:44
@flying-sheep

Copy link
Copy Markdown
Member

Also this needs a release note!

@Intron7

Intron7 commented Apr 17, 2025

Copy link
Copy Markdown
Member Author

@flying-sheep of course

@flying-sheep flying-sheep left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Release note please

@flying-sheep
flying-sheep enabled auto-merge (squash) April 29, 2025 13:22
@selmanozleyen
selmanozleyen disabled auto-merge May 19, 2025 08:06
flying-sheep and others added 4 commits May 19, 2025 10:32
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philipp A. <flying-sheep@web.de>
Co-authored-by: Phil Schaf <flying-sheep@web.de>
Co-authored-by: Rodrigo Goya <rgoya@users.noreply.github.com>
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.

normalize_total with numba

6 participants