Issue
So I ran the following code and for some reason spyder is presenting it in latex using some library it asked me to install rather than jsut reporting it as an array.
import numpy as np
from sympy import Matrix
b=2
m=np.array([[0, 0, 0], [0, b, 1], [1, 0, 0], ])
A=Matrix(m)
T, R =A.jordan_form()
before it installed I called T
T
Out[9]:
Matrix([
[ 0, -1, 0],
[ 1, 1, 1],
[-1, 0, 0]])
Now when I call T I get this annoying image in mathjax notation it looks ugly and I would rather jsut see the vlaues displayed as before
Solution
(Spyder maintainer here) To avoid that, you need to add the following code to your file:
import numpy as np
from sympy import init_printing, Matrix
init_printing(use_latex=False)
b=2
m=np.array([[0, 0, 0], [0, b, 1], [1, 0, 0], ])
A=Matrix(m)
T, R =A.jordan_form()
You can do further adjustments to the way Sympy objects are printed by passing other options to init_printing.
Answered By - Carlos Cordoba
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.