Skip to content

Commit

Permalink
Format file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-foster committed Nov 2, 2023
1 parent b15f2cc commit 74cc3f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function Base.:+(A::Matrix, x::AbstractJuMPScalar)
return error(

Check warning on line 456 in src/operators.jl

View check run for this annotation

Codecov / codecov/patch

src/operators.jl#L455-L456

Added lines #L455 - L456 were not covered by tests
"Addition between a Matrix and a JuMP variable is not supported: instead of `A + x`, " *
"prefer `A .+ x` for element-wise addition, or if you are modifying the diagonal entries of the matrix " *
"do `A + x * LinearAlgebra.I(n)`, where `n` is the diagonal length."
"do `A + x * LinearAlgebra.I(n)`, where `n` is the diagonal length.",
)
end

Expand All @@ -466,8 +466,8 @@ function Base.:-(A::Matrix, x::AbstractJuMPScalar)
return error(

Check warning on line 466 in src/operators.jl

View check run for this annotation

Codecov / codecov/patch

src/operators.jl#L465-L466

Added lines #L465 - L466 were not covered by tests
"Subtraction between a Matrix and a JuMP variable is not supported: instead of `A - x`, " *
"prefer `A .- x` for element-wise subtraction, or if you are modifying the diagonal entries of the matrix " *
"do `A - x * LinearAlgebra.I(n)`, where `n` is the diagonal length."
"do `A - x * LinearAlgebra.I(n)`, where `n` is the diagonal length.",
)
end

Base.:-(x::AbstractJuMPScalar, A::Matrix) = A - x
Base.:-(x::AbstractJuMPScalar, A::Matrix) = A - x

Check warning on line 473 in src/operators.jl

View check run for this annotation

Codecov / codecov/patch

src/operators.jl#L473

Added line #L473 was not covered by tests

0 comments on commit 74cc3f0

Please sign in to comment.