diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-08-16 18:38:26 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-08-19 17:24:58 -0500 |
commit | 731127385578fa2cf4e0ad48ef2e456d897d36de (patch) | |
tree | 82293572491a42d87f990077d6f217e52be07c67 /numpy/lib/_iotools.py | |
parent | 03cd242040120a149615cb2c843636069fa2ff10 (diff) | |
download | numpy-731127385578fa2cf4e0ad48ef2e456d897d36de.tar.gz |
BUG: Fix crash on genfromtxt with nested empty structured array
Previously this would fail with `ValueError: could not assign tuple of length 2 to structure with 3 fields.`, now it raises `NotImplementedError`.
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 8a042f190..04b147b0e 100644 --- a/numpy/lib/_iotools.py +++ b/numpy/lib/_iotools.py @@ -121,7 +121,7 @@ def has_nested_fields(ndtype): """ for name in ndtype.names or (): - if ndtype[name].names: + if ndtype[name].names is not None: return True return False |