summaryrefslogtreecommitdiff
path: root/numpy/core/arrayprint.py
diff options
context:
space:
mode:
authorAllan Haldane <allan.haldane@gmail.com>2018-04-21 15:09:30 -0400
committerAllan Haldane <allan.haldane@gmail.com>2018-04-21 15:09:30 -0400
commit2af7ebb7c07470860fc44f0aefdc2cc53f698447 (patch)
tree40004ecd51381d239d74880e18de8c2070d147c4 /numpy/core/arrayprint.py
parent09048a0e053e97078cad1d3070ff23580ef13562 (diff)
downloadnumpy-2af7ebb7c07470860fc44f0aefdc2cc53f698447.tar.gz
BUG: 'style' arg to array2string broken in legacy mode
Fixes #10934
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r--numpy/core/arrayprint.py3
1 files changed, 3 insertions, 0 deletions
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: