Register a binary scalar function.
()
| 129 | |
| 130 | @pytest.fixture(scope="session") |
| 131 | def binary_func_fixture(): |
| 132 | """ |
| 133 | Register a binary scalar function. |
| 134 | """ |
| 135 | def binary_function(ctx, m, x): |
| 136 | return pc.call_function("multiply", [m, x], |
| 137 | memory_pool=ctx.memory_pool) |
| 138 | func_name = "y=mx" |
| 139 | binary_doc = {"summary": "y=mx", |
| 140 | "description": "find y from y = mx"} |
| 141 | pc.register_scalar_function(binary_function, |
| 142 | func_name, |
| 143 | binary_doc, |
| 144 | {"m": pa.int64(), |
| 145 | "x": pa.int64(), |
| 146 | }, |
| 147 | pa.int64()) |
| 148 | return binary_function, func_name |
| 149 | |
| 150 | |
| 151 | @pytest.fixture(scope="session") |
nothing calls this directly
no outgoing calls
no test coverage detected