Description
When plotting the stream plot using "compute_and_plot_total_velocity", an error occurs:
ValueError: Layer 'Velocity' needs to be of one of np.ndarray, numpy.ma.core.MaskedArray, scipy.sparse.spmatrix, awkward.Array, h5py.Dataset, zarr.Array, zappy.base.ZappyArray, anndata.experimental.[CSC,CSR]Dataset, dask.array.Array, cupy.ndarray, or cupyx.scipy.sparse.spmatrix, not <class 'torch.Tensor'>.
Note that I used GPU to compute the results of cell2fate.
Reproducing the issue
The cell [15] in the mouse pancreas tutorial:
mod.compute_and_plot_total_velocity(adata, save = results_path + data_name + 'total_velocity_plots.png', delete = False)
Expected behavior
I guess that the error was caused by data type conversion between torch and numpy.
The "torch.from_numpy" should be added to the line 616 of the file "_cell2fate_DynamicalModel.py".
System
- OS: [Ubuntu 18.04]
- Python version [3.9]
Dependencies versions
cell2fate==0.1a0
Description
When plotting the stream plot using "compute_and_plot_total_velocity", an error occurs:
Note that I used GPU to compute the results of cell2fate.
Reproducing the issue
The cell [15] in the mouse pancreas tutorial:
mod.compute_and_plot_total_velocity(adata, save = results_path + data_name + 'total_velocity_plots.png', delete = False)Expected behavior
I guess that the error was caused by data type conversion between torch and numpy.
The "torch.from_numpy" should be added to the line 616 of the file "_cell2fate_DynamicalModel.py".
System
Dependencies versions
cell2fate==0.1a0