diff --git a/python/src/fit.hpp b/python/src/fit.hpp index 2205829e..84f677b8 100644 --- a/python/src/fit.hpp +++ b/python/src/fit.hpp @@ -266,8 +266,7 @@ fit_dispatch(const aare::FitModel &model, } } else { { - py::gil_scoped_release - release; // release GIL for parallel loop} + py::gil_scoped_release release; // release GIL for parallel loop result = aare::fit_pixel(model, x_view, y_view); } } @@ -302,6 +301,7 @@ void define_fit_bindings(py::module &m) { // ── Polynomial of degree 1 ─────── if (py::isinstance>(model_obj)) { + const auto &mdl = model_obj.cast &>(); return fit_dispatch(mdl, x, y, y_err_obj, n_threads);