From 2af7ebb7c07470860fc44f0aefdc2cc53f698447 Mon Sep 17 00:00:00 2001 From: Allan Haldane Date: Sat, 21 Apr 2018 15:09:30 -0400 Subject: BUG: 'style' arg to array2string broken in legacy mode Fixes #10934 --- numpy/core/arrayprint.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'numpy/core/arrayprint.py') diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index adbbab6ed..f39248bd0 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -647,6 +647,9 @@ def array2string(a, max_line_width=None, precision=None, options.update(overrides) if options['legacy'] == '1.13': + if style is np._NoValue: + style = repr + if a.shape == () and not a.dtype.names: return style(a.item()) elif style is not np._NoValue: -- cgit v1.2.1