Beispiel #1
0
def dispmat(n, mat):
    s = r'\begin{pmatrix}'
    for row in mat:
        rw = '& '.join([sparse_cyclotomic_to_latex(n, z) for z in row])
        s += rw + '\\\\'
    s += r'\end{pmatrix}'
    return s
Beispiel #2
0
 def sparse_cyclotomic_to_latex(n, dat):
     # The indirection is because we want to make this a staticmethod
     return sparse_cyclotomic_to_latex(n, dat)