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 PyArray contructors to Bound API (Part 1) #416

Merged
merged 5 commits into from
Mar 25, 2024

Conversation

Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Mar 23, 2024

Following #415

This migrates PyArray constructors to the Bound API. I created a commit for each constructor migration. To keep the diff reviewable I will split this over multiple PRs. This starts the migration with PyArray::{new, borrow_from_array, from_owned_array, zeros}.

(This also reexports PyArray0Methods, which we forgot in #415)

src/array.rs Outdated Show resolved Hide resolved
@adamreichold
Copy link
Member

The commit message

deprecate PyArray::D>::borrow_from_array

seems to still contain a stray ::D> or GitHub's UI is somehow mangling this.

(As an aside, I really like this commit as I think it is a glimpse of how the bound API will play out simplifying memory-management-remembering-there-is-a-GIL-pool-behind-the-scenes gymnastics throughout the ecosystem.)

@adamreichold adamreichold merged commit 9d7882f into PyO3:main Mar 25, 2024
33 of 35 checks passed
@Icxolu Icxolu deleted the constructors-1 branch March 25, 2024 18:22
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.

2 participants