Skip to content

Commit

Permalink
add check for square matrix to solve.symbolicMatrix()
Browse files Browse the repository at this point in the history
  • Loading branch information
john-d-fox committed Aug 12, 2024
1 parent 14f751c commit 4482490
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions dev/Arith.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ solve.symbolicMatrix <- function (a, b, simplify=FALSE, ...) {
# simplify: if TRUE return LaTeX expression with 1/det as multiplier

numericDimensions(a)
if (Nrow(a) != Ncol(a)) stop("matrix 'a' must be square")
if (!missing(b)) warning("'b' argument to solve() ignored")

det <- parenthesize(determinant(a))
Expand Down

0 comments on commit 4482490

Please sign in to comment.