diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-07 09:52:12 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-07 09:52:12 -0600 |
commit | 6339930ff42f52259e898b18eb6e9dd7d1be4f86 (patch) | |
tree | abc7578d1e0440de3c31169c22e61c1219ff5ac6 /numpy/core/_internal.py | |
parent | aab46a78cefe9fbd46104496ffad17667784a3f5 (diff) | |
download | numpy-6339930ff42f52259e898b18eb6e9dd7d1be4f86.tar.gz |
MAINT: Fixup more dictionary fixer fixes.
Most of these are places where an iterator will work as well as a
list, but two fix places where `iterkeys` was introduced which is
a bug.
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index 292dfb8be..8046de149 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -332,7 +332,7 @@ _pep3118_native_map = { 'O': 'O', 'x': 'V', # padding } -_pep3118_native_typechars = ''.join(list(_pep3118_native_map.keys())) +_pep3118_native_typechars = ''.join(_pep3118_native_map.keys()) _pep3118_standard_map = { '?': '?', @@ -356,7 +356,7 @@ _pep3118_standard_map = { 'O': 'O', 'x': 'V', # padding } -_pep3118_standard_typechars = ''.join(list(_pep3118_standard_map.keys())) +_pep3118_standard_typechars = ''.join(_pep3118_standard_map.keys()) def _dtype_from_pep3118(spec, byteorder='@', is_subdtype=False): from numpy.core.multiarray import dtype @@ -505,7 +505,7 @@ def _dtype_from_pep3118(spec, byteorder='@', is_subdtype=False): offset += extra_offset # Check if this was a simple 1-item type - if len(list(fields.keys())) == 1 and not explicit_name and fields['f0'][1] == 0 \ + if len(fields) == 1 and not explicit_name and fields['f0'][1] == 0 \ and not is_subdtype: ret = fields['f0'][0] else: |