Issue with the spatial transcriptomics tutorial

Hi everyone,

So, I am trying to follow the " Analysis and visualization of spatial transcriptomics data" tutorial, but keep run into the same problem when running the “sc.pp.calculate_qc_metrics(adata, qc_vars=[“mt”], inplace=True)” command. When running it, I get the following TypeError: "TypeError: expected dtype object, got ‘numpy.dtype[float64]’.

Does anyone have an idea to fix it?

  • I have tried updating my Numba, but did not fix

Best regards,
Peter

1 Like

For future reference, if anyone encounter this problem:
You can solve this problem by updating Numba, and force an API-compatible version of Numpy

Oh interesting, I’ve been manually changing dtypes of scanPy columns and it’s been a huge pain. Could you tell me what numba and numpy versions you’re using?

Sounds like a huge pain! :open_mouth: Hope this may help you
numba 0.54.0
numpy 1.20.3