diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-13 15:34:26 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-13 17:04:13 -0600 |
commit | 0dfe67afd1ee9e4c905bf119673f6e634221f21b (patch) | |
tree | a45a1e39de66d5d462a69040ea7e996cf234a011 /numpy/lib/_iotools.py | |
parent | e589c6ed1dac7755bb7bd9e181a43ebeff62dcec (diff) | |
download | numpy-0dfe67afd1ee9e4c905bf119673f6e634221f21b.tar.gz |
2to3: Apply zip fixer.
In Python 3 zip returns an iterator instead of a list. Consequently, in
places where an iterator won't do it must be enclosed in list(...).
Lists instead of iterators are also used in array constructors as using
iterators there usually results in an object array containing an
iterator object.
Closes #3094
Diffstat (limited to 'numpy/lib/_iotools.py')
-rw-r--r-- | numpy/lib/_iotools.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/_iotools.py b/numpy/lib/_iotools.py index dc143415e..dc7f533a5 100644 --- a/numpy/lib/_iotools.py +++ b/numpy/lib/_iotools.py @@ -855,7 +855,7 @@ def easy_dtype(ndtype, names=None, defaultfmt="f%i", **validationargs): if nbtypes == 0: formats = tuple([ndtype.type] * len(names)) names = validate(names, defaultfmt=defaultfmt) - ndtype = np.dtype(zip(names, formats)) + ndtype = np.dtype(list(zip(names, formats))) # Structured dtype: just validate the names as needed else: ndtype.names = validate(names, nbfields=nbtypes, |