I have implemented a custom matrix printer with "_print_MatrixBase(self,
expr)."  I am running "jupyter notebook" with the output of
"_print_MatrixBase(self, expr)" being given by -

    def _print_MatrixBase(self, expr):
        rows = expr.rows
        cols = expr.cols

        out_str = ' \\left [ \\begin{array}{' + (cols * 'c') + '} '
        for row in range(rows):
            for col in range(cols):
                out_str += latex(expr[row,col]) + ' & '
            out_str = out_str[:-2] + ' \\\\ '
        out_str = out_str[:-4] + ' \\end{array}\\right ] '

        if isinteractive():
            return display(Math(out_str))
        else:
            return out_str

for "jupyter notebook" the output is "return display(Math(out_str))" where
the out_str ins the tex output for the matrix.  The notebook output is -

see Capture.PNG

Where  sp3.g is a sympy Matrix.  Why is "None"  output along with the
correct matrix output?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CALOxT-mhU--urwGR19u%3Dt4v%2BT4%2B%3DEpbqxbcTHefrpiL1DTSBvA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to