MCPcopy Create free account
hub / github.com/OpenCodeInterpreter/OpenCodeInterpreter / is_floats

Function is_floats

evaluation/evaluate/utils.py:143–151  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

141Result = Tuple[str, List[bool]]
142
143def is_floats(x) -> bool:
144 # check if it is float; List[float]; Tuple[float]
145 if isinstance(x, float):
146 return True
147 if isinstance(x, (list, tuple)):
148 return all(isinstance(i, float) for i in x)
149 if isinstance(x, np.ndarray):
150 return x.dtype == np.float64 or x.dtype == np.float32
151 return False
152
153
154def unsafe_execute(

Callers 1

unsafe_executeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected