diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-03-26 17:50:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-26 12:50:20 -0500 |
commit | 1c58504eec43f9ba18ac835131fed496fb59772d (patch) | |
tree | 4ffc786c9cdac81887680aa999ae6dcbd4bd407d /numpy/lib/format.py | |
parent | 5ff70eb0fd61a39207d5166479507e1b099cb707 (diff) | |
download | numpy-1c58504eec43f9ba18ac835131fed496fb59772d.tar.gz |
MAINT: simplify code that assumes str/unicode and int/long are different types (#15816)
Cleanup from the dropping of python 2
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r-- | numpy/lib/format.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py index e2696c286..2afa4ac10 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -166,7 +166,7 @@ import io import warnings from numpy.lib.utils import safe_eval from numpy.compat import ( - isfileobj, long, os_fspath, pickle + isfileobj, os_fspath, pickle ) @@ -594,7 +594,7 @@ def _read_array_header(fp, version): # Sanity-check the values. if (not isinstance(d['shape'], tuple) or - not numpy.all([isinstance(x, (int, long)) for x in d['shape']])): + not numpy.all([isinstance(x, int) for x in d['shape']])): msg = "shape is not valid: {!r}" raise ValueError(msg.format(d['shape'])) if not isinstance(d['fortran_order'], bool): |