# HG changeset patch # User Nic Cleju # Date 1331648291 -7200 # Node ID a115c982a0fd8d98bc80b2f40794c3a94cc09e84 # Parent 2fc28e2ae0a29c154bc48e541065c10e807571a4 Fixed bug in GAP: Lambdahat might get empty after row removing; in this case should stop and return current solution, otherwise it will raise an exception next time you try to remove rows diff -r 2fc28e2ae0a2 -r a115c982a0fd pyCSalgos/GAP/GAP.py --- a/pyCSalgos/GAP/GAP.py Mon Mar 12 16:42:12 2012 +0200 +++ b/pyCSalgos/GAP/GAP.py Tue Mar 13 16:18:11 2012 +0200 @@ -313,6 +313,10 @@ #figure(10); #imshow(reshape(real(xhat), n, n)); + # Added by Nic: if Lambdahat is empty here, return + if Lambdahat.size == 0: + break; + #return; return xhat,Lambdahat