summaryrefslogtreecommitdiff
path: root/numpy/lib/polynomial.py
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@gmail.com>2019-05-20 09:37:18 -0700
committerGitHub <noreply@github.com>2019-05-20 09:37:18 -0700
commitf9c1502e7ace9b48f0256a77c560aae43763a1f2 (patch)
tree1b04f2a79f979f6039a794173560da7153093ac9 /numpy/lib/polynomial.py
parentbdd75dff0aa8b77be5784923befb6410fc2f4837 (diff)
downloadnumpy-f9c1502e7ace9b48f0256a77c560aae43763a1f2.tar.gz
BUG: Increment stacklevel for warnings to account for NEP-18 overrides (#13589)
* Increment stacklevel for warnings to account for NEP-18 overrides For NumPy functions that make use of `__array_function__`, the appropriate the stack level for warnings should generally be increased by 1 to account for the override function defined in numpy.core.overrides. Fixes GH-13329 * Update numpy/lib/type_check.py Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r--numpy/lib/polynomial.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py
index 1f08abf36..2c72f623c 100644
--- a/numpy/lib/polynomial.py
+++ b/numpy/lib/polynomial.py
@@ -634,7 +634,7 @@ def polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False):
# warn on rank reduction, which indicates an ill conditioned matrix
if rank != order and not full:
msg = "Polyfit may be poorly conditioned"
- warnings.warn(msg, RankWarning, stacklevel=3)
+ warnings.warn(msg, RankWarning, stacklevel=4)
if full:
return c, resids, rank, s, rcond