diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2019-08-18 21:10:21 -0500 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2019-08-19 19:15:17 -0500 |
commit | 1f0d66ce8be689ab86001696891858a1dee631cc (patch) | |
tree | c1e6b16c3c5761b879e8398fa1221e7004fe0cc6 /numpy/core/arrayprint.py | |
parent | 18eb65228d0e3eca03796e9c30744974e53e2997 (diff) | |
download | numpy-1f0d66ce8be689ab86001696891858a1dee631cc.tar.gz |
MAINT: Use the `.names is None` idiom to detect structured array in arrayprint
No behavior change here
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index 6a71de226..a305552ee 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -672,7 +672,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 |