Skip to content

Commit

Permalink
Merge pull request OpenChemistry#288 from swelborn/stempy-python-fix-…
Browse files Browse the repository at this point in the history
…staging

acquire gil before creating numpy array
  • Loading branch information
swelborn authored May 30, 2023
2 parents b5f55ae + 7a37d63 commit 9a02f6b
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 9a02f6b

Please sign in to comment.