morris-lab / CellOracle

This is the alpha version of the CellOracle package
Other
314 stars 56 forks source link

Error in calculating embedding shift #206

Closed Larrycpan closed 4 months ago

Larrycpan commented 4 months ago

Thanks for the great tool. I was encountering the error 'AttributeError: 'csr_matrix' object has no attribute 'A' when using the function calculate_embedding_shift. Do you know how to resolve? Look forward to your reply. QQ截图20240711135941

hzuzu commented 4 months ago

Hi, I am having the same issues. while working through the tutorial of 1. In silico gene perturbation with GRNs. I am using cellOracle version '0.18.0' The calculate embedding step fails:

# Calculate embedding
oracle.calculate_embedding_shift(sigma_corr=0.05)
Screenshot 2024-07-15 at 12 54 10 PM

The csr_matrix object does not seem to have any '.A' attribute.

Larrycpan commented 4 months ago

I found the error is raised from the version of scipy. Install the older scipy library (pip install scipy==1.12.0) would resolve problem.

hzuzu commented 4 months ago

That worked. Thanks @Larrycpan !