-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Warnings need different stacklevel after NEP 18 overrides #13329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes, this would be good to add to the tracking issue.
…On Sun, Apr 14, 2019 at 1:23 PM Ralf Gommers ***@***.***> wrote:
An example can be seen in recent doc builds:
/home/circleci/repo/venv/lib/python3.6/site-packages/numpy/core/overrides.py:150: RankWarning: Polyfit may be poorly conditioned
implementation, public_api, relevant_args, args, kwargs)
/home/circleci/repo/venv/lib/python3.6/site-packages/numpy/core/overrides.py:150: RankWarning: Polyfit may be poorly conditioned
implementation, public_api, relevant_args, args, kwargs)
In every function that got an override, the warnings stacklevel needs to
be increased by 1.
I looked for an existing issue for this but couldn't find it. @shoyer
<https://github.com/shoyer> does this need to be added to the NEP 18
tracking issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#13329>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABKS1qvZd2jiMN-fKDn2yrNxB8HO4iA1ks5vg45GgaJpZM4cu1DD>
.
|
33 tasks
shoyer
added a commit
to shoyer/numpy
that referenced
this issue
May 19, 2019
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 numpyGH-13329
shoyer
added a commit
that referenced
this issue
May 20, 2019
#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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An example can be seen in recent doc builds:
In every function that got an override, the warnings
stacklevel
needs to be increased by 1.I looked for an existing issue for this but couldn't find it. @shoyer does this need to be added to the NEP 18 tracking issue?
The text was updated successfully, but these errors were encountered: