diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-08-22 09:25:18 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-22 09:25:18 -0600 |
commit | cd4cda8c0faef8d97e18629dbb8ea8a2c4685451 (patch) | |
tree | cece2eeb59ff5ff0355f17128fa89735cf18ce4e /numpy/core/_internal.py | |
parent | 3ca0eb1136102ff01bcc171f53c106326fa4445b (diff) | |
parent | 0f5e376d3eb6118b783cdd3ecd27722c2d1934ba (diff) | |
download | numpy-cd4cda8c0faef8d97e18629dbb8ea8a2c4685451.tar.gz |
Merge pull request #14290 from eric-wieser/fix-if-fields
BUG: Fix misuse of .names and .fields in various places
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index c70718cb6..b0ea603e1 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -459,7 +459,7 @@ def _getfield_is_safe(oldtype, newtype, offset): if newtype.hasobject or oldtype.hasobject: if offset == 0 and newtype == oldtype: return - if oldtype.names: + if oldtype.names is not None: for name in oldtype.names: if (oldtype.fields[name][1] == offset and oldtype.fields[name][0] == newtype): |