I have the following vector.
x = np.array([[ 0.87695113],
[ 0.3284933 ],
[-0.35078323]])
When I call numpy version of qr
from numpy.linalg import qr as qr_numpy
qr_numpy(x)
I obtain
(array([[-0.87695113],
[-0.3284933 ],
[ 0.35078323]]), array([[-1.]]))
whereas when I run the scipy version I get something entirely different.
from scipy.linalg import qr as qr_scipy
qr_scipy(x)
With output
(array([[-0.87695113, -0.3284933 , 0.35078323],
[-0.3284933 , 0.94250897, 0.06139208],
[ 0.35078323, 0.06139208, 0.93444215]]), array([[-1.],
[ 0.],
[ 0.]]))
What is going on??