From 47e92ac9520659d070fdfbf53c481107029db2d1 Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Tue, 4 Aug 2015 16:38:02 -0400 Subject: [PATCH] Remove some signatures for chksquare and make the ... version type stable --- base/linalg.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/linalg.jl b/base/linalg.jl index cf54409769b9d..2de5c4e455a70 100644 --- a/base/linalg.jl +++ b/base/linalg.jl @@ -166,14 +166,14 @@ else end # Check that stride of matrix/vector is 1 -function chkstride1(A::StridedVecOrMat...) +function chkstride1(A...) for a in A stride(a,1)== 1 || error("matrix does not have contiguous columns") end end # Check that matrix is square -function chksquare(A::AbstractMatrix) +function chksquare(A) m,n = size(A) m == n || throw(DimensionMismatch("matrix is not square")) m @@ -185,7 +185,7 @@ function chksquare(A...) size(a,1)==size(a,2) || throw(DimensionMismatch("matrix is not square: dimensions are $(size(a))")) push!(sizes, size(a,1)) end - length(A)==1 ? sizes[1] : sizes + return sizes end # Check that upper/lower (for special matrices) is correctly specified