Replies: 2 comments
|
You can bridge the CSC storage arrays explicitly. SciPy and First canonicalize a copy on the Python side: A = A.tocsc(copy=True)
A.sum_duplicates()
A.sort_indices()Then pass CsMat::<f64>::try_new_csc(shape, indptr, indices, data)Use the fallible constructor and translate its error into a Python exception. SciPy index arrays may be This creates an owned copy. A borrowed References: SciPy CSC storage, sprs constructors. |
Uh oh!
There was an error while loading. Please reload this page.
I would like to know how to use csc matrix in pyo3, for example, how to convert it into sprs CsMat?
All reactions