mudata icon indicating copy to clipboard operation
mudata copied to clipboard

Reindexing only valid with uniquely valued Index objects

Open raozuming opened this issue 1 year ago • 1 comments

Describe the bug mudata v.0.2.3 version, anndata v0.9.2, calling mudata.update(), causing anadata data update failure, confirming that there are no duplicate data in the original data, generating duplicate data in line 799 now_index = pd.Index(now_values), triggering line 801 index_order = prev_index.get_indexer(now_index), pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects

image

To Reproduce Steps to reproduce the behaviour.

Please provide exact steps to reproduce the bug in a clean Python environment. In case it's not clear what's causing this bug, please provide the data or the data generation procedure. Sometimes it is not possible to share the data but usually it is possible to replicate problems on publicly available datasets or to share a subset of your data.

Expected behaviour A clear and concise description of what you expected to happen.

System

  • OS: centOS
  • Python version :3.8.12
  • Versions of libraries involved :Anndata: v0.9.2 mudata: v0.2.3 pandas: v1.5.3

Additional context Add any other context about the problem here.

raozuming avatar Jun 28 '24 10:06 raozuming

Do you have any steps to reproduce that, @raozuming?

gtca avatar Jul 02 '24 02:07 gtca

We improved a few things about .update() since v0.2.3. Closing it due to inactivity, please reopen if there's still an issue!

gtca avatar Mar 18 '25 14:03 gtca