Open
Description
Is there a way to convert a PyObject containing a sparse matrix to a Julia sparse Matrix type ?
@pyimport scipy.sparse as sp
Id = sp.eye(4)
Idj = convert(SparseMatrixCSC{Float64,Int64},Id)
ERROR: MethodError: `convert` has no method matching convert(::Type{SparseMatrixCSC{Float64,Int64}}, ::PyCall.PyObject)
This may have arisen from a call to the constructor SparseMatrixCSC{Float64,Int64}(...),
since type constructors fall back to convert methods.
Closest candidates are:
call{T}(::Type{T}, ::Any)
convert{Tv,Ti,TvS,TiS}(::Type{SparseMatrixCSC{Tv,Ti}}, ::SparseMatrixCSC{TvS,TiS})
convert{Tv}(::Type{SparseMatrixCSC{Tv,Int64}}, ::Base.SparseMatrix.CHOLMOD.Sparse{Tv})
Metadata
Metadata
Assignees
Labels
No labels