diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2019-07-23 10:59:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 10:59:01 -0700 |
commit | 8261472a08841e15a85fc68ddfa23da014e99170 (patch) | |
tree | ac943212a1a6f5538f37d449b42d989d3e61c677 | |
parent | bc78f065f39e64746b8683470684ef8c7e915c1a (diff) | |
parent | 9d51a9f598cb3dc0c2bf8d460da4abc71d50b013 (diff) | |
download | numpy-8261472a08841e15a85fc68ddfa23da014e99170.tar.gz |
Merge pull request #14072 from kritisingh1/dep2
DEP: Deprecate full and economic modes for linalg.qr
-rw-r--r-- | numpy/linalg/linalg.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index 325d35c19..2a3ff0728 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -778,15 +778,13 @@ def qr(a, mode='reduced'): ---------- a : array_like, shape (M, N) Matrix to be factored. - mode : {'reduced', 'complete', 'r', 'raw', 'full', 'economic'}, optional + mode : {'reduced', 'complete', 'r', 'raw'}, optional If K = min(M, N), then * 'reduced' : returns q, r with dimensions (M, K), (K, N) (default) * 'complete' : returns q, r with dimensions (M, M), (M, N) * 'r' : returns r only with dimensions (K, N) * 'raw' : returns h, tau with dimensions (N, M), (K,) - * 'full' : alias of 'reduced', deprecated - * 'economic' : returns h from 'raw', deprecated. The options 'reduced', 'complete, and 'raw' are new in numpy 1.8, see the notes for more information. The default is 'reduced', and to @@ -848,12 +846,8 @@ def qr(a, mode='reduced'): >>> np.allclose(a, np.dot(q, r)) # a does equal qr True >>> r2 = np.linalg.qr(a, mode='r') - >>> r3 = np.linalg.qr(a, mode='economic') >>> np.allclose(r, r2) # mode='r' returns the same r as mode='full' True - >>> # But only triu parts are guaranteed equal when mode='economic' - >>> np.allclose(r, np.triu(r3[:6,:6], k=0)) - True Example illustrating a common use of `qr`: solving of least squares problems |