diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2020-12-05 13:22:39 +0100 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2020-12-05 13:22:39 +0100 |
commit | b2778a8a6d99dfbfee8f09daf6c069d1acf1aa8d (patch) | |
tree | 2691fb225b407e81b9012cfdc1fbfa59a089b019 /numpy/lib/npyio.py | |
parent | 45840adcf20eabc665d2fc17f28bf93e75bdf20a (diff) | |
download | numpy-b2778a8a6d99dfbfee8f09daf6c069d1acf1aa8d.tar.gz |
MAINT: Replace `contextlib_nullcontext` with `contextlib.nullcontext`
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 3b2de3e61..af8e28e42 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -24,7 +24,7 @@ from ._iotools import ( from numpy.compat import ( asbytes, asstr, asunicode, os_fspath, os_PathLike, - pickle, contextlib_nullcontext + pickle ) @@ -517,7 +517,7 @@ def save(file, arr, allow_pickle=True, fix_imports=True): # [1 2] [1 3] """ if hasattr(file, 'write'): - file_ctx = contextlib_nullcontext(file) + file_ctx = contextlib.nullcontext(file) else: file = os_fspath(file) if not file.endswith('.npy'): @@ -1792,7 +1792,7 @@ def genfromtxt(fname, dtype=float, comments='#', delimiter=None, fid_ctx = contextlib.closing(fid) else: fid = fname - fid_ctx = contextlib_nullcontext(fid) + fid_ctx = contextlib.nullcontext(fid) fhd = iter(fid) except TypeError as e: raise TypeError( |