8000 BUG: fix incorrect exception handling in arrayprint. Closes ticket 2… · numpy/numpy@48d6edb · GitHub
[go: up one dir, main page]

Skip to content

Commit 48d6edb

Browse files
author
Ralf Gommers
committed
BUG: fix incorrect exception handling in arrayprint. Closes ticket 2038.
1 parent b8bfcd0 commit 48d6edb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/core/arrayprint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def __init__(self, data):
657657
max_str_len = max(len(str(maximum.reduce(data, skipna=True))),
658658
len(str(minimum.reduce(data, skipna=True))))
659659
self.format = '%' + str(max_str_len) + 'd'
660-
except TypeError, NotImplementedError:
660+
except (TypeError, NotImplementedError):
661661
# if reduce(data) fails, this instance will not be called, just
662662
# instantiated in formatdict.
663663
pass

0 commit comments

Comments
 (0)
0