()
| 200 | |
| 201 | |
| 202 | def _test(): |
| 203 | batch_code = [ |
| 204 | """ |
| 205 | from sympy import Matrix |
| 206 | |
| 207 | def null_space_basis(): |
| 208 | # Define the matrix |
| 209 | A = Matrix([[3, 3, -1, -6], [9, -1, -8, -1], [7, 4, -2, -9]]) |
| 210 | |
| 211 | # Compute the basis for the null space |
| 212 | basis = A.nullspace() |
| 213 | |
| 214 | # Round the elements of the basis vectors to three decimal places |
| 215 | basis_rounded = [v.evalf(3) for v in basis] |
| 216 | |
| 217 | return basis_rounded |
| 218 | |
| 219 | result = null_space_basis() |
| 220 | print(result) |
| 221 | """ |
| 222 | ] |
| 223 | |
| 224 | executor = PythonExecutor(get_answer_from_stdout=True) |
| 225 | predictions = executor.apply(batch_code[0]) |
| 226 | print(predictions) |
| 227 | |
| 228 | |
| 229 | if __name__ == '__main__': |
no test coverage detected