MCPcopy Create free account
hub / github.com/CERT-Lab/lora-sb / fix_sqrt

Function fix_sqrt

instruction_tuning_eval/utils.py:157–169  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

155
156
157def fix_sqrt(string):
158 if "\\sqrt" not in string:
159 return string
160 splits = string.split("\\sqrt")
161 new_string = splits[0]
162 for split in splits[1:]:
163 if split[0] != "{":
164 a = split[0]
165 new_substr = "\\sqrt{" + a + "}" + split[1:]
166 else:
167 new_substr = "\\sqrt" + split
168 new_string += new_substr
169 return new_string
170
171
172def strip_string(string):

Callers 1

strip_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected