diff options
Diffstat (limited to 'scipy/base/arrayprint.py')
-rw-r--r-- | scipy/base/arrayprint.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scipy/base/arrayprint.py b/scipy/base/arrayprint.py index 8ec43de0f..6124a1bc2 100644 --- a/scipy/base/arrayprint.py +++ b/scipy/base/arrayprint.py @@ -186,7 +186,7 @@ def array2string(a, max_line_width = None, precision = None, style=repr): if a.shape == (): - x = a[()] + x = a.toscalar() try: lst = a._format(x) except AttributeError: @@ -216,7 +216,7 @@ def _formatArray(a, format_function, rank, max_line_len, """ if rank == 0: - return str(a[()]) + return str(a.toscalar()) if summary_insert and 2*edge_items < len(a): leading_items, trailing_items, summary_insert1 = \ |