Call a Python function stored in the module's pyfuncs.
(self, func_name: str, args)
| 275 | return out[0] if len(out) == 1 else out |
| 276 | |
| 277 | def call_py_func(self, func_name: str, args): |
| 278 | """Call a Python function stored in the module's pyfuncs.""" |
| 279 | if func_name not in self.pyfuncs: |
| 280 | raise ValueError(f"Python function '{func_name}' not found in module pyfuncs") |
| 281 | py_func = self.pyfuncs[func_name] |
| 282 | return py_func(self, *args) |
| 283 | |
| 284 | def _create_output_tensors(self, out_sinfo, in_args=None): |
| 285 | # pylint: disable=import-outside-toplevel |
no outgoing calls