summaryrefslogtreecommitdiff
path: root/numpy/lib/format.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/lib/format.py
parent9164f23c19c049e28d4d4825a53bbb01aedabcfc (diff)
downloadnumpy-7884a8c9f5f5c6657413dbeaa59ad969280d38ea.tar.gz
ENH: Add stacklevel to all (or almost all) our function calls
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r--numpy/lib/format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py
index e62677bd8..633aee675 100644
--- a/numpy/lib/format.py
+++ b/numpy/lib/format.py
@@ -556,7 +556,7 @@ def write_array(fp, array, version=None, allow_pickle=True, pickle_kwargs=None):
# this warning can be removed when 1.9 has aged enough
if version != (2, 0) and used_ver == (2, 0):
warnings.warn("Stored array in format 2.0. It can only be"
- "read by NumPy >= 1.9", UserWarning)
+ "read by NumPy >= 1.9", UserWarning, stacklevel=2)
if array.itemsize == 0:
buffersize = 0
@@ -759,7 +759,7 @@ def open_memmap(filename, mode='r+', dtype=None, shape=None,
# this warning can be removed when 1.9 has aged enough
if version != (2, 0) and used_ver == (2, 0):
warnings.warn("Stored array in format 2.0. It can only be"
- "read by NumPy >= 1.9", UserWarning)
+ "read by NumPy >= 1.9", UserWarning, stacklevel=2)
offset = fp.tell()
finally:
fp.close()