summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2016-01-23 15:58:58 +0100
committerSebastian Berg <sebastian@sipsolutions.net>2016-09-02 16:39:17 +0200
commit7884a8c9f5f5c6657413dbeaa59ad969280d38ea (patch)
tree91b55f723315291bf2605bb42aef809a65ff1d85 /numpy/core/numeric.py
parent9164f23c19c049e28d4d4825a53bbb01aedabcfc (diff)
downloadnumpy-7884a8c9f5f5c6657413dbeaa59ad969280d38ea.tar.gz
ENH: Add stacklevel to all (or almost all) our function calls
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index 8db4e1302..81ed0178a 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -1181,7 +1181,8 @@ def alterdot():
"""
# 2014-08-13, 1.10
- warnings.warn("alterdot no longer does anything.", DeprecationWarning)
+ warnings.warn("alterdot no longer does anything.",
+ DeprecationWarning, stacklevel=2)
def restoredot():
@@ -1205,7 +1206,8 @@ def restoredot():
"""
# 2014-08-13, 1.10
- warnings.warn("restoredot no longer does anything.", DeprecationWarning)
+ warnings.warn("restoredot no longer does anything.",
+ DeprecationWarning, stacklevel=2)
def tensordot(a, b, axes=2):
@@ -2260,8 +2262,8 @@ def binary_repr(num, width=None):
if width is not None and width < binwidth:
warnings.warn(
"Insufficient bit width provided. This behavior "
- "will raise an error in the future.", DeprecationWarning
- )
+ "will raise an error in the future.", DeprecationWarning,
+ stacklevel=3)
if num == 0:
return '0' * (width or 1)