Saving then reading turns list into numpy.ndarray?
See original GitHub issueHey!
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:
- Created 4 years ago
- Comments:8 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks, Malte. h5py doesn’t store as lists. Fixed now in scvelo.
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?