-
Notifications
You must be signed in to change notification settings - Fork 9
A _repr_html_ for a matchpy expression. #6
Comments
Perhaps offtopic: while looking at the repr tree of an expression is useful, it disturbs the mathematical interpretation by a human. Would it make sense to invent a less verbose representation of such a tree, for instance:
or similar in terms of verbosity? |
@pearu Yes that is a good idea. The |
I have this kind of pretty printing now working in jupyter notebooks: https://github.com/Quansight-Labs/uarray/blob/master/uarray/uarray/printing.py |
You may prefer the IPython machinery for registering your reprs.
This would avoid some hard coding the reprs. More info @ https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html#IPython.display.display |
Ah nice thanks for that code snippet. Reopening this to adopt that |
In the web view, a pure html representation might be better for the
matchpy...Expressions
This snippet is meant to be registered in a notebook to demonstrate the idea.
The text was updated successfully, but these errors were encountered: