Make the numpy inputs for the given dtype and case.
(dtype: str, case: MathCase)
| 253 | |
| 254 | |
| 255 | def make_numpy_inputs(dtype: str, case: MathCase): |
| 256 | """Make the numpy inputs for the given dtype and case.""" |
| 257 | lhs = np.array([0.25, 0.5, 1.0, 2.0, 4.0, 9.0, 16.0, 10.0], dtype=dtype) |
| 258 | if case.num_inputs == 1: |
| 259 | return [lhs] |
| 260 | elif case.num_inputs == 2: |
| 261 | rhs = np.array([2.0, 3.0, 0.5, 1.5, 0.25, 0.5, 2.0, 1.0], dtype=dtype) |
| 262 | return [lhs, rhs] |
| 263 | else: |
| 264 | raise ValueError(f"Unsupported number of inputs: {case.num_inputs}") |
| 265 | |
| 266 | |
| 267 | def check_runtime(dtype: str, case: MathCase, executable: Executable): |
no outgoing calls
no test coverage detected
searching dependent graphs…