Skip to content

Commit 5c3b86f

Browse files
committed
Matplotlib export: avoid numpy repr because of version differences
1 parent c19e777 commit 5c3b86f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Orange/widgets/utils/matplotlib_export.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
def numpy_repr(a):
1212
""" A numpy repr without summarization """
1313
opts = np.get_printoptions()
14+
# avoid numpy repr as it changes between versions
15+
# TODO handle numpy repr differences
16+
if isinstance(a, np.ndarray):
17+
return "array(" + repr(list(a)) + ")"
1418
try:
1519
np.set_printoptions(threshold=10**10)
1620
return repr(a)

0 commit comments

Comments
 (0)