diff options
author | kritisingh1 <kritisingh1.ks@gmail.com> | 2019-07-21 14:23:41 +0530 |
---|---|---|
committer | kritisingh1 <kritisingh1.ks@gmail.com> | 2019-07-22 12:27:25 +0530 |
commit | 9d51a9f598cb3dc0c2bf8d460da4abc71d50b013 (patch) | |
tree | 0ecccbf49005ce3ba4ce333cd13de8d15e760591 /numpy/linalg/linalg.py | |
parent | ea965e4cd328fbcf76b03ff749ef06d2aa38c28b (diff) | |
download | numpy-9d51a9f598cb3dc0c2bf8d460da4abc71d50b013.tar.gz |
DEP: Deprecate full and economic modes for linalg.qr
Diffstat (limited to 'numpy/linalg/linalg.py')
-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 |