scverse / scverse/scanpy

Should log1p edit .X inplace?

Open
#1,415 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

It's a little confusing why something like normalize_total doesn't inplace edit the data, but log1p does.

https://github.com/theislab/scanpy/blob/5533b644e796379fd146bf8e659fd49f92f718cd/scanpy/preprocessing/_simple.py#L309-L321

Why should out be set here?

Screen Shot 2020-09-15 at 7 35 03 PM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with scanpy/preprocessing/_simple.py around lines 309-321 and compare log1p with normalize_total, focusing on how the out argument affects .X. Review the existing comments and relevant preprocessing tests, if present. Done means the intended in-place behavior is resolved and consistently documented or covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.