MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / _remove_right_units

Function _remove_right_units

data_preprocessing/math_util/math_normalize.py:71–78  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

69
70
71def _remove_right_units(string):
72 # "\\text{ " only ever occurs (at least in the val set) when describing units
73 if "\\text{ " in string:
74 splits = string.split("\\text{ ")
75 assert len(splits) == 2
76 return splits[0]
77 else:
78 return string
79
80
81def _fix_sqrt(string):

Callers 1

_strip_stringFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected