diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-08-18 21:03:44 -0500 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-08-19 19:15:17 -0500 |
commit | 18eb65228d0e3eca03796e9c30744974e53e2997 (patch) | |
tree | 168ae494b3f21fe03c5cab4903a665f99967ca14 /numpy/lib/recfunctions.py | |
parent | 0bdf0b9c50422fa698131481ff74a4bec39df33e (diff) | |
download | numpy-18eb65228d0e3eca03796e9c30744974e53e2997.tar.gz |
MAINT: Remove incorrect comment about flattening
Also adjust the code to more clearly indicate what actually happens.
The behavior is identical before and after this patch.
Diffstat (limited to 'numpy/lib/recfunctions.py')
-rw-r--r-- | numpy/lib/recfunctions.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/recfunctions.py b/numpy/lib/recfunctions.py index fb0ae5cc3..a5d464e32 100644 --- a/numpy/lib/recfunctions.py +++ b/numpy/lib/recfunctions.py @@ -209,8 +209,8 @@ def zip_dtype(seqarrays, flatten=False): else: for a in seqarrays: current = a.dtype - if current.names and len(current.names) <= 1: - # special case - dtypes of 0 or 1 field are flattened + if current.names is not None and len(current.names) == 1: + # special case - dtypes of 1 field are flattened newdtype.extend(get_fieldspec(current)) else: newdtype.append(('', current)) |