[Numpy-discussion] np.linalg.lstsq with several columns all 0 => huge x ?

denis denis-bz-gg@t-online...
Thu Oct 25 02:49:40 CDT 2012


On 24/10/2012 19:59, josef.pktd@gmail.com wrote:
> On Wed, Oct 24, 2012 at 1:33 PM, denis<denis-bz-gg@t-online.de>  wrote:
>> Folks,
>>     np.linalg.lstsq of a random-uniform A 50 x 32 with 3 columns all 0
>> returns x[:3] 0 as expected,
>> but 4 columns all 0 =>  huge x:


> lstsq has rcond argument to do (I think) essentially the same.
> might need to be increased in your example.
>
> Josef

rcond 1e-3 works, 1e-6 does not, for these sizes;
the returned singular values don't change much from 3 to 4
columns of 0s, so why the big jump ?
cheers
   -- denis



More information about the NumPy-Discussion mailing list