Bugfix on GIL release
Some checks failed
Building, testing and releasing LASP if it has a tag / Build-Test-Ubuntu (push) Failing after 2m9s
Building, testing and releasing LASP if it has a tag / Release-Ubuntu (push) Has been skipped

This commit is contained in:
Anne de Jong 2024-03-06 22:12:42 +01:00
parent bf06402b11
commit 204e431d79

View File

@ -114,9 +114,10 @@ void init_dsp(py::module &m) {
aps.def("compute", [](AvPowerSpectra &aps, dpyarray timedata) { aps.def("compute", [](AvPowerSpectra &aps, dpyarray timedata) {
std::optional<ccube> res; std::optional<ccube> res;
dmat timedata_mat = NpyToMat<d, false>(timedata);
{ {
py::gil_scoped_release release; py::gil_scoped_release release;
res = aps.compute(NpyToMat<d, false>(timedata)); res = aps.compute(timedata_mat);
} }
return CubeToNpy<c>(res.value_or(ccube(0, 0, 0))); return CubeToNpy<c>(res.value_or(ccube(0, 0, 0)));