Skip to content

Commit

Permalink
The old :left vs :right got me again (#1582)
Browse files Browse the repository at this point in the history
  • Loading branch information
joschmitt authored Jan 29, 2024
1 parent 8e269a6 commit 07f41a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -651,15 +651,15 @@ end
function check_linear_system_dim_right(A::Union{MatElem, SolveCtx}, b::MatElem, throw_error::Bool = true)
fl = nrows(A) == nrows(b)
if !fl && throw_error
error("Incompatible number of rows in linear system (use `side = :left` to switch to an action from the left)")
error("Incompatible number of rows in linear system (use `side = :left` for a system with the indeterminate on the left)")
end
return fl
end

function check_linear_system_dim_right(A::Union{MatElem, SolveCtx}, b::Vector, throw_error::Bool = true)
fl = nrows(A) == length(b)
if !fl && throw_error
error("Incompatible number of rows in linear system (use `side = :left` to switch to an action from the left)")
error("Incompatible number of rows in linear system (use `side = :left` for a system with the indeterminate on the left)")
end
return fl
end
Expand All @@ -668,15 +668,15 @@ end
function check_linear_system_dim_left(A::Union{MatElem, SolveCtx}, b::MatElem, throw_error::Bool = true)
fl = ncols(A) == ncols(b)
if !fl && throw_error
error("Incompatible number of columns in linear system (use `side = :right` to switch to an action from the right)")
error("Incompatible number of columns in linear system (use `side = :right` for a system with the indeterminate on the right)")
end
return fl
end

function check_linear_system_dim_left(A::Union{MatElem, SolveCtx}, b::Vector, throw_error::Bool = true)
fl = ncols(A) == length(b)
if !fl && throw_error
error("Incompatible number of columns in linear system (use `side = :right` to switch to an action from the right)")
error("Incompatible number of columns in linear system (use `side = :right` for a system with the indeterminate on the right)")
end
return fl
end
Expand Down

0 comments on commit 07f41a0

Please sign in to comment.