Skip to content

Commit

Permalink
sage.repl.display.fancy_repr: Do not fail if sage.matrix.matrix1 cann…
Browse files Browse the repository at this point in the history
…o be imported
  • Loading branch information
Matthias Koeppe committed Jun 22, 2020
1 parent 2664865 commit 2a602df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sage/repl/display/fancy_repr.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ def __call__(self, obj, p, cycle):
if not p.toplevel():
# Do not print the help for matrices inside containers
return False
from sage.matrix.matrix1 import Matrix
try:
from sage.matrix.matrix1 import Matrix
except ModuleNotFoundError:
return False
if not isinstance(obj, Matrix):
return False
from sage.matrix.matrix0 import max_rows, max_cols
Expand Down

0 comments on commit 2a602df

Please sign in to comment.