From 1f0d66ce8be689ab86001696891858a1dee631cc Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sun, 18 Aug 2019 21:10:21 -0500 Subject: MAINT: Use the `.names is None` idiom to detect structured array in arrayprint No behavior change here --- numpy/core/arrayprint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/core/arrayprint.py') 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 -- cgit v1.2.1