fix issue with torch/numpy indexing#267
Conversation
|
Could you elaborate please on the problem you have? |
|
I was running Maarten's code, but not his fork, and encountered the issue. Please see here for details scipy/scipy#22935. |
|
I should further explain that torch.Tensors are not currently supported by scipy for indexing sparse matrices, as seen in the scipy PR. However,I don't really expect the scipy PR to be accepted (at least as is). An alternative solution in this PR would be to use |
|
Is this a recent change? Because it was working without any problems. |
|
According to the blame, the scpoli_model.py module and I would comment on the scipy PR with your thoughts if possible. Otherwise, it would be great if this PR or an alternative fix could be made here. 🙏 |
|
Following up here; we have been using this fix without problem for a while; perhaps you would be able to merge it? We are currently always installing scArches from a forked version. |
|
#279 seems like a similar issue |
| @@ -351,12 +349,15 @@ def get_latent( | |||
| indices = torch.arange(x.shape[0]) | |||
There was a problem hiding this comment.
i think it is better to just do this originally with numpy here instead of converting to numpy later
There was a problem hiding this comment.
@Koncopd yes, good catch. I believe my latest commit addresses this.
|
My latest commit is to avoid a warning when converting to tensor |
I am personally not able to run scPoli unless I use this workaround.