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.

Saving then reading turns list into numpy.ndarray?

See original GitHub issue

Hey!

I just noticed that saving and then reading an anndata object turns a list in adata.uns['velocity_settings']['embeddings'] into a numpy.ndarray, which then fails in an scvelo function. Is this a scanpy or an anndata issue? It seems related to a lot of the stuff I’ve been reading.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
VolkerBergencommented, Oct 24, 2019

Thanks, Malte. h5py doesn’t store as lists. Fixed now in scvelo.

0reactions
LuckyMDcommented, Oct 24, 2019

Okay… scvelo uses adata.uns['velocity_settings']['embeddings'].extend() which only works on lists.

@VolkerBergen shall i report this again in the scvelo repo or is this sufficient for you?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Saving then reading turns list into numpy.ndarray? · Issue #887
I just noticed that saving and then reading an anndata object turns a list in adata.uns['velocity_settings']['embeddings'] into a numpy.ndarray ...
Read more >
How to save a list as numpy array in python? - Stack Overflow
First of all, I'd recommend you to go through NumPy's Quickstart tutorial, which will probably help with these basic questions.
Read more >
Convert Python List to numpy Arrays - GeeksforGeeks
In Python lists can be converted to arrays by using two methods from the NumPy library: Using numpy. array()
Read more >
How to Convert a List to a NumPy Array? - Finxter
The simplest way to convert a Python list to a NumPy array is to use the np.array() function that takes an iterable and...
Read more >
numpy.ndarray.tolist — NumPy v1.24 Manual
numpy.ndarray.tolist# ; Return the array as an a.ndim -levels deep nested list of Python scalars. ; If a.ndim is 0, then since the...
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