Skip to content

Commit

Permalink
Merge pull request #12457 from JuliaLang/anj/chksquare
Browse files Browse the repository at this point in the history
Remove some signatures for chksquare and make the ... version type stable
  • Loading branch information
andreasnoack committed Aug 5, 2015
2 parents e66175b + 47e92ac commit 2171f80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/linalg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2171f80

Please sign in to comment.