def test_callback_factory():
args = x, y = symbols('x y')
expr = x + atan(y)
cb = _callback_factory(args, [expr], 'numpy', np.float64, 'C')
inp = np.array([17, 1])
ref = 17 + np.arctan(1)
assert np.allclose(cb(inp), ref)
评论列表
文章目录