diff options
Diffstat (limited to 'numpy/lib/format.py')
-rw-r--r-- | numpy/lib/format.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py index 40788e148..81e8cd010 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -344,8 +344,7 @@ def read_array_header_1_0(fp): if not isinstance(d, dict): msg = "Header is not a dictionary: %r" raise ValueError(msg % d) - keys = list(d.keys()) - keys.sort() + keys = sorted(d.keys()) if keys != ['descr', 'fortran_order', 'shape']: msg = "Header does not contain the correct keys: %r" raise ValueError(msg % (keys,)) |