question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error in scanpy first tutorial

See original GitHub issue

Hi, I’m trying scanpy for the first time, but following the first tutorial I got the error below. Any idea of what is happening?

>>> filter_result = sc.pp.filter_genes_dispersion(
...     adata.X, min_mean=0.0125, max_mean=3, min_disp=0.5)
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/scanpy/preprocessing/simple.py", line 328, in filter_genes_dispersion
    disp_std_bin[one_gene_per_bin] = disp_mean_bin[one_gene_per_bin]
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/series.py", line 938, in __setitem__
    setitem(key, value)
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/series.py", line 929, in setitem
    self._where(~key, value, inplace=True)
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/generic.py", line 7539, in _where
    level=level, fill_value=np.nan)
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/series.py", line 3248, in align
    broadcast_axis=broadcast_axis)
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/generic.py", line 7366, in align
    fill_axis=fill_axis)
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/generic.py", line 7435, in _align_series
    return_indexers=True)
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 3772, in join
    return_indexers=return_indexers)
  File "/opt/anaconda3/envs/tiget/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 4012, in _join_monotonic
    ridx = self._left_indexer_unique(sv, ov)
  File "pandas/_libs/join_helper.pxi", line 774, in pandas._libs.join.left_join_indexer_unique_object
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'signed char'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fidelramcommented, May 23, 2018

The solution do downgrade to pandas=0.22 worked for me. Thanks

0reactions
falexwolfcommented, May 23, 2018

I was wrong. The pandas 0.23 issue is not related to the prerelease… Unfortunately, I still haven’t found the time to figure out what is going wrong… but it’s on top of the list.

Read more comments on GitHub >

github_iconTop Results From Across the Web

error in scanpy first tutorial · Issue #158 - GitHub
Hi, I'm trying scanpy for the first time, but following the first tutorial I got the error below. Any idea of what is...
Read more >
Scanpy – Single-Cell Analysis in Python — Scanpy 1.9.1 ...
Scanpy – Single-Cell Analysis in Python . Scanpy is a scalable toolkit for analyzing single-cell gene expression data built jointly with anndata....
Read more >
scanpy_01_qc
In this tutorial, we will run all tutorials with a set of 6 PBMC 10x datasets ... First, let Scanpy calculate some general...
Read more >
Error in highly variable gene selection - scanpy - scverse
Hi I am trying to use SCVI - tools for batch correction. I followed as in tutorial. I got the error in the...
Read more >
1st scanpy session - overview and experimental considerations
In the first session of this series, we give an overview on ... This is the recording of the scanpy tutorial held at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found