[SciPy-User] qr decompostion gives negative q, r ?

Robert Kern robert.kern@gmail....
Tue Nov 20 16:59:55 CST 2012


On Tue, Nov 20, 2012 at 10:49 PM, Virgil Stokes <vs@it.uu.se> wrote:

> Ok Skipper,
> Unfortunately, things are worse than I had hoped, numpy sometimes
> returns the negative of the q,r and other times the same as MATLAB!
> Thus, as someone has already mentioned in this discussion, the "sign"
> seems to depend on the matrix being decomposed. This could be a
> nightmare to track down.
>
> I hope that I can return to some older versions of numpy/scipy to work
> around this problem until this problem is fixed. Any suggestions on how
> to recover earlier versions would be appreciated.

That's not going to help you. The only thing that we guarantee (or
have *ever* guaranteed) is that the result is a valid QR
decomposition. If you need to swap signs to normalize things to your
desired convention, you will need to do that as a postprocessing step.

--
Robert Kern


More information about the SciPy-User mailing list