summaryrefslogtreecommitdiff
path: root/numpy/lib/_iotools.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-08-16 18:38:26 -0700
committerEric Wieser <wieser.eric@gmail.com>2019-08-19 17:24:58 -0500
commit731127385578fa2cf4e0ad48ef2e456d897d36de (patch)
tree82293572491a42d87f990077d6f217e52be07c67 /numpy/lib/_iotools.py
parent03cd242040120a149615cb2c843636069fa2ff10 (diff)
downloadnumpy-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.py2
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