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

Function _is_frac

data_preprocessing/math_util/__init__.py:69–70  ·  view source on GitHub ↗
(expr: str)

Source from the content-addressed store, hash-verified

67
68
69def _is_frac(expr: str) -> bool:
70 return bool(re.search(r"^-?[0-9]+.?/0*[1-9][0-9]*.?$", expr))
71
72
73def _str_is_int(x: str) -> bool:

Callers 1

grade_answerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected