Closed
Description
python version: 2.7.6
numpy version: 1.8.0
Here is a short example:
import numpy as np
from numpy.linalg import lstsq
a = np.array([[1, 0], [0, 1]]);
b = np.array([1,2]);
print(lstsq(a,b));
Since a
is 2x2 matrix of rank 2, I expect the residual to be 0 instead of empty list according to the doc (http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.lstsq.html). But here is what I get:
(array([ 1., 2.]), array([], dtype=float64), 2, array([ 1., 1.]))
Metadata
Metadata
Assignees
Labels
No labels