Open GhostInTheShellwjc opened 1 week ago
Maybe your adata.X object is Array, not sparse matrix. So you could convert the data structure of adata_concat.X to the sparse matrix format with the following code:
from scipy.sparse import csr_matrix
adata_concat.X = csr_matrix(adata_concat.X)
@DBinary Thank you for your help, but I'm sorry to inform you that the method you provided doesn't seem to have solved my problem effectively. I resolved the issue by modifying the init function within the class pySTAligner in "D:\Miniconda3\envs\omicverse\Lib\site-packages\omicverse\space_integrate.py" ,swapping the order of code execution.And it works well.
Hello!When I run the codes in tutorial Spatial integration and clustering,it raises error AttributeError: 'ArrayView' object has no attribute 'todense' when I run STAligner_obj = ov.space.pySTAligner(adata_concat, verbose=True, knn_neigh = 100, n_epochs = 600, iter_comb = iter_comb,batch_key = 'batch_name', key_added='STAligner', Batch_list = Batch_list,device = 'cpu').Perhaps it is due to the version of scipy.However, my scipy version is 1.11.4 which is <1.12 required by the requirement.txt.It really confuses me.Hopefully it can be solved.
platform:jupyter on vscode in Windows11