Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Arrow Pycapsule interface #63

Closed
wants to merge 2 commits into from
Closed

Migrate to Arrow Pycapsule interface #63

wants to merge 2 commits into from

Conversation

nmandery
Copy link
Owner

@nmandery nmandery commented Oct 8, 2024

Fixes #55

let anchorarray = get_anchor_array(anchor, i_array.len())?;

let localij_arrays = LocalIJArrays::try_new(anchorarray, i_array, j_array).into_pyresult()?;

let cellarray = if set_failing_to_invalid {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI not holding the py: Python token does not mean that it will automatically release the GIL. You always need to manually release the GIL with py.allow_threads

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I misunderstood that and already used allow_threads in many places.

Copy link
Contributor

@kylebarron kylebarron Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I also misunderstood that at first and assumed that not holding py meant you automatically would release the GIL. It would be really cool if it did work that way!

@nmandery
Copy link
Owner Author

Closing in favor of #64

@nmandery nmandery closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt Arrow PyCapsule Interface and remove required pyarrow dependency
2 participants