diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-09-02 10:06:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-02 10:06:54 -0500 |
commit | 3dbbfd8db5c21c603620bebc98e03bc84334f11c (patch) | |
tree | e29eb26cfbf72ee9b03aa15dd02671bf17e70301 /numpy/linalg/linalg.py | |
parent | 9164f23c19c049e28d4d4825a53bbb01aedabcfc (diff) | |
parent | 68ea0c792db6bac435752e45d8681f7f1283453d (diff) | |
download | numpy-3dbbfd8db5c21c603620bebc98e03bc84334f11c.tar.gz |
Merge pull request #7148 from seberg/stacklevel+tests
ENH,TST: Bump stacklevel and add tests for warnings
Diffstat (limited to 'numpy/linalg/linalg.py')
-rw-r--r-- | numpy/linalg/linalg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index db50a5eec..a05b0ee8e 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -737,12 +737,12 @@ def qr(a, mode='reduced'): msg = "".join(( "The 'full' option is deprecated in favor of 'reduced'.\n", "For backward compatibility let mode default.")) - warnings.warn(msg, DeprecationWarning) + warnings.warn(msg, DeprecationWarning, stacklevel=2) mode = 'reduced' elif mode in ('e', 'economic'): # 2013-04-01, 1.8 msg = "The 'economic' option is deprecated.", - warnings.warn(msg, DeprecationWarning) + warnings.warn(msg, DeprecationWarning, stacklevel=2) mode = 'economic' else: raise ValueError("Unrecognized mode '%s'" % mode) |