Skip to content

Commit

Permalink
api: add _latex print for function for notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Aug 22, 2023
1 parent 41501c4 commit a38ea46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions devito/types/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ def __str__(self):
def _sympystr(self, printer):
return str(self)

_latex = _sympystr

def __eq__(self, other):
try:
return (self.function is other.function and
Expand Down
2 changes: 1 addition & 1 deletion examples/seismic/tutorials/07_DRP_schemes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"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"
"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"
]
}
],
Expand Down

0 comments on commit a38ea46

Please sign in to comment.