From 204e431d7992f8354deea2e3c3955a1d727a5ba0 Mon Sep 17 00:00:00 2001 From: "J.A. de Jong - Redu-Sone B.V., ASCEE V.O.F." Date: Wed, 6 Mar 2024 22:12:42 +0100 Subject: [PATCH] Bugfix on GIL release --- cpp_src/pybind11/lasp_dsp_pybind.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp_src/pybind11/lasp_dsp_pybind.cpp b/cpp_src/pybind11/lasp_dsp_pybind.cpp index a770647..b5cedc3 100644 --- a/cpp_src/pybind11/lasp_dsp_pybind.cpp +++ b/cpp_src/pybind11/lasp_dsp_pybind.cpp @@ -114,9 +114,10 @@ void init_dsp(py::module &m) { aps.def("compute", [](AvPowerSpectra &aps, dpyarray timedata) { std::optional res; + dmat timedata_mat = NpyToMat(timedata); { py::gil_scoped_release release; - res = aps.compute(NpyToMat(timedata)); + res = aps.compute(timedata_mat); } return CubeToNpy(res.value_or(ccube(0, 0, 0)));