Should log1p edit .X inplace?
See original GitHub issueIt’s a little confusing why something like normalize_total doesn’t inplace edit the data, but log1p does.
Why should out be set here?

Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Should log1p edit .X inplace? · Issue #1415 · scverse/scanpy
It's a little confusing why something like normalize_total doesn't inplace edit the data, but log1p does.
Read more >When should log1p and expm1 be used?
For real-valued arguments, log1p(x) and expm1(x) should be used when x is small, e.g., when 1+x=1 in floating point accuracy.
Read more >scanpy.pp.calculate_qc_metrics - Read the Docs
Set to False to skip computing log1p transformed annotations. Depending on inplace returns calculated metrics (as DataFrame ) or updates adata 's obs...
Read more >Numpy log1p Example | np log1p() in Python - Morioh
Numpy log1p() is a math function that helps the user to calculate the natural logarithmic value of x+1 where x belongs to all...
Read more >is log1p the "correct" way of doing log scale transformation of ...
No. log1p(x) does not compute the logarithm of x and should not be used if you ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We will always try to make
.Xa reference to the passed array. There may be cases where we need to make a copy, but we’ll try to avoid that.So with this change
.Xwould always be a view of the same data, regardless of type?