# [Scipy-tickets] [SciPy] #243: linalg.qr to take mode argument

SciPy scipy-tickets@scipy....
Wed Feb 27 15:03:59 CST 2008

```#243: linalg.qr to take mode argument
--------------------------+-------------------------------------------------
Reporter:  oliphant      |        Owner:  rkern
Type:  defect        |       Status:  assigned
Priority:  high          |    Milestone:  0.7
Component:  scipy.linalg  |      Version:
Severity:  normal        |   Resolution:
Keywords:                |
--------------------------+-------------------------------------------------
Comment (by nils):

Is this ticket still valid ?
Scipy's qr:
{{{
qr(a, overwrite_a=0, lwork=None, econ=False, mode='qr')
Compute QR decomposition of a matrix.

Calculate the decomposition :lm:`A = Q R` where Q is
unitary/orthogonal
and R upper triangular.

Parameters
----------
a : array, shape (M, N)
Matrix to be decomposed
overwrite_a : boolean
Whether data in a is overwritten (may improve performance)
lwork : integer
Work array size, lwork >= a.shape[1]. If None or -1, an optimal
size
is computed.
econ : boolean
Whether to compute the economy-size QR decomposition, making
shapes
of Q and R (M, K) and (K, N) instead of (M,M) and (M,N).
K=min(M,N)
mode : {'qr', 'r'}
Determines what information is to be returned: either both Q and R
or only R.
}}}

Numpy's qr

{{{
qr(a, mode='full')
Compute QR decomposition of a matrix.

Calculate the decomposition :lm:`A = Q R` where Q is orthonormal
and R upper triangular.

Parameters
----------
a : array, shape (M, N)
Matrix to be decomposed
mode : {'full', 'r', 'economic'}
Determines what information is to be returned. 'full' is the
default.
Economic mode is slightly faster if only R is needed.

}}}

--
Ticket URL: <http://scipy.org/scipy/scipy/ticket/243#comment:4>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.
```