Skip to content

Commit

Permalink
Merge pull request #141 from Ayush-iitkgp/correcting_diag_atom
Browse files Browse the repository at this point in the history
Correcting diag atom
  • Loading branch information
madeleineudell committed Jun 7, 2016
2 parents fc4efc6 + 493cbb3 commit ee89004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/atoms/affine/diag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type DiagAtom <: AbstractExpr
function DiagAtom(x::AbstractExpr, k::Int=0)
(num_rows, num_cols) = x.size

if k >= num_cols || k <= -num_rows
if k >= min(num_rows, num_cols) || k <= -min(num_rows, num_cols)
error("Bounds error in calling diag")
end

Expand Down

0 comments on commit ee89004

Please sign in to comment.