diff options
author | Stefan Winkler <mail@stefanwinkler.de> | 2017-10-02 19:06:11 +0200 |
---|---|---|
committer | Stefan Winkler <mail@stefanwinkler.de> | 2017-10-03 11:39:43 +0200 |
commit | 80c624e2d986f3bb1544be46906ed1a198594f59 (patch) | |
tree | 8295925d5841ebbca038ce4569fbfd6650af8f82 /numpy/core/arrayprint.py | |
parent | 04c43f177dcf156ab85118898d30870a38df70cc (diff) | |
download | numpy-80c624e2d986f3bb1544be46906ed1a198594f59.tar.gz |
BUG: fix stray comma in _array2string
_array2string unconditionally added a comma after the '...' that
are inserted for arrays exceeding the size threshold. Instead, add
the separator character in _formatArray. Fixes #9777.
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index e1df556ef..7ce6e0795 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -373,7 +373,7 @@ def _recursive_guard(fillvalue='...'): @_recursive_guard() def _array2string(a, options, separator=' ', prefix=""): if a.size > options['threshold']: - summary_insert = "..., " + summary_insert = "..." data = _leading_trailing(a) else: summary_insert = "" @@ -545,7 +545,7 @@ def _formatArray(a, format_function, rank, max_line_len, if summary_insert and 2*edge_items < len(a): leading_items = edge_items trailing_items = edge_items - summary_insert1 = summary_insert + summary_insert1 = summary_insert + separator else: leading_items = 0 trailing_items = len(a) |