diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-04-24 16:17:12 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-24 16:17:12 -0600 |
commit | d2d0dba130b9e4050cc3dac7aa07661d5ce5a033 (patch) | |
tree | e3f8cebf2b33a64d5023fd65a3e95fa29044c75b /numpy/core/arrayprint.py | |
parent | ac76793dafcd6e5f24ed052fc40413f29ebc5306 (diff) | |
parent | 2af7ebb7c07470860fc44f0aefdc2cc53f698447 (diff) | |
download | numpy-d2d0dba130b9e4050cc3dac7aa07661d5ce5a033.tar.gz |
Merge pull request #10946 from ahaldane/fix_style_arg
BUG: 'style' arg to array2string broken in legacy mode
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 3 |
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: |