Skip to content

Commit 9b63f91

Browse files
committed
api: add _latex print for function for notebooks
1 parent e0d79c3 commit 9b63f91

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎devito/types/basic.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,8 @@ def __str__(self):
858858
def _sympystr(self, printer):
859859
return str(self)
860860

861+
_latex = _sympystr
862+
861863
def __eq__(self, other):
862864
try:
863865
return (self.function is other.function and

‎examples/seismic/tutorials/07_DRP_schemes.ipynb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"name": "stdout",
100100
"output_type": "stream",
101101
"text": [
102-
"W(x, 1, u(t, x, y), x)*u(t, x, y) + W(x - h_x, 1, u(t, x, y), x)*u(t, x - h_x, y) + W(x + h_x, 1, u(t, x, y), x)*u(t, x + h_x, y)\n"
102+
"u(t, x, y)*W(x, 1, u(t, x, y), x) + u(t, x - h_x, y)*W(x - h_x, 1, u(t, x, y), x) + u(t, x + h_x, y)*W(x + h_x, 1, u(t, x, y), x)\n"
103103
]
104104
}
105105
],

0 commit comments

Comments
 (0)