summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2019-08-22 09:25:18 -0600
committerGitHub <noreply@github.com>2019-08-22 09:25:18 -0600
commitcd4cda8c0faef8d97e18629dbb8ea8a2c4685451 (patch)
treecece2eeb59ff5ff0355f17128fa89735cf18ce4e /numpy/core/arrayprint.py
parent3ca0eb1136102ff01bcc171f53c106326fa4445b (diff)
parent0f5e376d3eb6118b783cdd3ecd27722c2d1934ba (diff)
downloadnumpy-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/arrayprint.py')
-rw-r--r--numpy/core/arrayprint.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py
index 69d91d248..5761c4875 100644
--- a/numpy/core/arrayprint.py
+++ b/numpy/core/arrayprint.py
@@ -685,7 +685,7 @@ def array2string(a, max_line_width=None, precision=None,
if style is np._NoValue:
style = repr
- if a.shape == () and not a.dtype.names:
+ if a.shape == () and a.dtype.names is None:
return style(a.item())
elif style is not np._NoValue:
# Deprecation 11-9-2017 v1.14