Skip to content

Commit 67d25ae

Browse files
simplify down to a single lu overload
1 parent 46bc6f9 commit 67d25ae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/operations.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,4 @@ Base.:*(A::SparseMatrixCSC{Tx,S}, x::StridedVector{Operation}) where {Tx,S} =
7979
Base.:*(A::SparseMatrixCSC{Operation,S}, x::StridedVector{Tx}) where {Tx,S} =
8080
(T = LinearAlgebra.promote_op(LinearAlgebra.matprod, Operation, Tx); mul!(similar(x, T, A.m), A, x, true, false))
8181

82-
function LinearAlgebra.det(O::Operation)
83-
det(lu(O,Val(false)))
84-
end
82+
LinearAlgebra.lu(O::AbstractMatrix{<:Operation};kwargs...) = lu(O,Val(false);kwargs...)

test/operation_overloads.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ using LinearAlgebra
33
@variables a,b,c,d
44
X = [a b;c d]
55
det(X)
6+
lu(X)
7+
inv(X)

0 commit comments

Comments
 (0)