Following the example on L1 norm approximation given here, with the following code,
from l1 import l1
from cvxopt import normal
m, n = 500, 100
P, q = normal(m,n), normal(m,1)
u = l1(P,q)
everything works okay.
However when I change m to be smaller than n,
from l1 import l1
from cvxopt import normal
m, n = 50, 100
P, q = normal(m,n), normal(m,1)
u = l1(P,q)
I get the following error:
ValueError: illegal value of ldB
I can see that the error is caused by the following statement in L1.py:180:
lapack.gels(+P, uls)
and diving further down into lapack.c:3651, the following statement throws the error:
if (ldB < MAX(MAX(1,n),m)) err_ld("ldB");
However, when I read the documentation on CVXOPT's LAPACK interface for cvxopt.lapack.gels, it specifically says, that when m is less than n, it solves a least norm problem.
Can anyone shed some light on why having m smaller than n does not work?