Converting a TensorProductOperator to a sparse matrix results in an error.
using SparseArrays, SciMLOperators
m = MatrixOperator(rand(1,1))
M = kron(m,m)
sparse(M)
#MethodError: no method matching sparse(::Type{AbstractMatrix}, ::MatrixOperator{Float64, Matrix{Float64}
This happens at
|
function SparseArrays.sparse(L::SciMLOperators.TensorProductOperator) |
|
return LinearAlgebra.kron(sparse.(AbstractMatrix, L.ops)...) |
|
end |
in SciMLOperators v1.16.0. It seems to me that the argument AbstractMatrix should not be there.
Converting a TensorProductOperator to a sparse matrix results in an error.
This happens at
SciMLOperators.jl/ext/SciMLOperatorsSparseArraysExt.jl
Lines 13 to 15 in 4a633c7
in SciMLOperators v1.16.0. It seems to me that the argument AbstractMatrix should not be there.