Skip to content

Commit

Permalink
acquire gil before creating numpy array
Browse files Browse the repository at this point in the history
  • Loading branch information
swelborn committed May 30, 2023
1 parent b5f55ae commit 7a37d63
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ struct ElectronCountedDataPyArray

ElectronCountedDataPyArray(ElectronCountedData&& other)
{
py::gil_scoped_acquire acquire;
data.resize(other.data.size());
for (size_t i = 0; i < other.data.size(); ++i) {
data[i].reserve(other.data[i].size());
Expand Down

0 comments on commit 7a37d63

Please sign in to comment.