Skip to content

Commit

Permalink
test: remove test_performance_optimize
Browse files Browse the repository at this point in the history
See #330
  • Loading branch information
redeboer committed Oct 11, 2021
1 parent ccd7baa commit 743c93c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,28 +72,3 @@ def test_helicity(helicity_model: SympyModel):
"m_f(0)(500)",
"Gamma_f(0)(500)",
}


@pytest.mark.parametrize(
("parameters", "variables", "backend"),
[
({"c_1": 1 + 1j}, {"x": np.array([1, 2, 3])}, "numpy"),
(
{"c_1": 1 + 1j, "c_2": -1 + 1j, "c_3": 1 - 1j},
{"x": np.array([0.5, 1, 1.5, 2, 3])},
"numpy",
),
({"c_1": 1 + 1j}, {"x": np.array([1, 2, 3])}, "jax"),
],
)
def test_sympy_performance_optimization(
parameters: dict, variables: dict, backend: str, sympy_model, function
) -> None:
function.update_parameters(parameters)
expected_values = function(variables)
opt_model = sympy_model.performance_optimize(
fix_inputs={**parameters, **variables}
)
callable_model = LambdifiedFunction(opt_model, backend)

np.testing.assert_almost_equal(callable_model({}), expected_values)

0 comments on commit 743c93c

Please sign in to comment.