Skip to content

Commit ce66605

Browse files
committed
sum, prod fallback methods
1 parent a0ca1f8 commit ce66605

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)