diff options
author | Mike Taves <mwtoews@gmail.com> | 2021-09-02 21:32:21 +1200 |
---|---|---|
committer | Mike Taves <mwtoews@gmail.com> | 2021-09-02 22:56:43 +1200 |
commit | 7ad8ea7b11e3544b133d8b397dd3bbe4833d3308 (patch) | |
tree | 8726a71692b20b079cec53e76f5c1fb33c806d7b /numpy/lib/format.py | |
parent | 9fca8f0c1a3f16f8f62ae574ec1a79b5b588214e (diff) | |
download | numpy-7ad8ea7b11e3544b133d8b397dd3bbe4833d3308.tar.gz |
MAINT: revise OSError aliases (IOError, EnvironmentError)
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r-- | numpy/lib/format.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py index 6ac66c22a..e566e253d 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -162,7 +162,6 @@ evolved with time and this document is more current. """ import numpy -import io import warnings from numpy.lib.utils import safe_eval from numpy.compat import ( @@ -831,7 +830,7 @@ def open_memmap(filename, mode='r+', dtype=None, shape=None, ------ ValueError If the data or the mode is invalid. - IOError + OSError If the file is not found or cannot be opened correctly. See Also @@ -909,7 +908,7 @@ def _read_bytes(fp, size, error_template="ran out of data"): data += r if len(r) == 0 or len(data) == size: break - except io.BlockingIOError: + except BlockingIOError: pass if len(data) != size: msg = "EOF: reading %s, expected %d bytes got %d" |