From 003bdc25b75566de64a90e223338b4bd4565155a Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sun, 18 Aug 2019 20:59:42 -0500 Subject: BUG: Fix flatten_dtype so that nested 0-field structs are flattened correctly This affects the behavior of merge_arrays. --- numpy/lib/recfunctions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/recfunctions.py') 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)) -- cgit v1.2.1