summaryrefslogtreecommitdiff
path: root/numpy/lib/recfunctions.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-08-18 20:59:42 -0500
committerEric Wieser <wieser.eric@gmail.com>2019-09-14 13:10:10 -0700
commit003bdc25b75566de64a90e223338b4bd4565155a (patch)
treee76bf039447d04291f413668ef8aee8efb04b84e /numpy/lib/recfunctions.py
parent31ffdecf07d18ed4dbb66b171cb0f998d4b190fa (diff)
downloadnumpy-003bdc25b75566de64a90e223338b4bd4565155a.tar.gz
BUG: Fix flatten_dtype so that nested 0-field structs are flattened correctly
This affects the behavior of merge_arrays.
Diffstat (limited to 'numpy/lib/recfunctions.py')
-rw-r--r--numpy/lib/recfunctions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/recfunctions.py b/numpy/lib/recfunctions.py
index 40060b41a..024ba763f 100644
--- a/numpy/lib/recfunctions.py
+++ b/numpy/lib/recfunctions.py
@@ -200,7 +200,7 @@ def flatten_descr(ndtype):
descr = []
for field in names:
(typ, _) = ndtype.fields[field]
- if typ.names:
+ if typ.names is not None:
descr.extend(flatten_descr(typ))
else:
descr.append((field, typ))