fix inplaces for log1p and scale#719
Conversation
Signed-off-by: Intron7 <severin.dicks@icloud.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #719 +/- ##
=======================================
Coverage 90.31% 90.31%
=======================================
Files 106 106
Lines 9581 9582 +1
=======================================
+ Hits 8653 8654 +1
Misses 928 928
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR fixes two bugs in preprocessing functions: ChangesPreprocessing metadata fixes
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant log1p
participant AnnData
Caller->>log1p: log1p(adata, inplace=True)
log1p->>AnnData: _set_obs_rep(transformed matrix)
log1p->>AnnData: uns["log1p"] = {base}
log1p-->>Caller: return
Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
log1pnow preserves input data correctly when run without in-place updates, and no longer writes unnecessary metadata.scalenow updates feature statistics only when scaling the main matrix or a layer, improving consistency across data locations.