Skip to content

Commit 76c9b3b

Browse files
Merge pull request #209 from vpuri3/sum
sum, prod fallbacks
2 parents 84b56c6 + ce66605 commit 76c9b3b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/interface.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,15 @@ function LinearAlgebra.opnorm(L::AbstractSciMLOperator, p::Real=2)
378378
opnorm(convert(AbstractMatrix, L), p)
379379
end
380380

381+
for op in (
382+
:sum, :prod,
383+
)
384+
@eval function Base.$op(L::AbstractSciMLOperator; kwargs...)
385+
@warn """using convert-based fallback in $($op)."""
386+
$op(convert(AbstractMatrix, L); kwargs...)
387+
end
388+
end
389+
381390
for pred in (
382391
:issymmetric,
383392
:ishermitian,

0 commit comments

Comments
 (0)