Skip to content

Commit a58ca64

Browse files
committed
remove obsolete escape_latex
1 parent 3c7a557 commit a58ca64

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

pymc3/util.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import functools
16-
import re
1716
import warnings
1817

1918
from typing import Dict, List, Tuple, Union
@@ -25,8 +24,6 @@
2524

2625
from cachetools import LRUCache, cachedmethod
2726

28-
LATEX_ESCAPE_RE = re.compile(r"(%|_|\$|#|&)", re.MULTILINE)
29-
3027
UNSET = object()
3128

3229

@@ -118,30 +115,6 @@ def tree_contains(self, item):
118115
return dict.__contains__(self, item)
119116

120117

121-
def escape_latex(strng):
122-
r"""Consistently escape LaTeX special characters for _repr_latex_ in IPython
123-
124-
Implementation taken from the IPython magic `format_latex`
125-
126-
Examples
127-
--------
128-
escape_latex('disease_rate') # 'disease\_rate'
129-
130-
Parameters
131-
----------
132-
strng: str
133-
string to escape LaTeX characters
134-
135-
Returns
136-
-------
137-
str
138-
A string with LaTeX escaped
139-
"""
140-
if strng is None:
141-
return "None"
142-
return LATEX_ESCAPE_RE.sub(r"\\\1", strng)
143-
144-
145118
def get_transformed_name(name, transform):
146119
r"""
147120
Consistent way of transforming names

0 commit comments

Comments
 (0)