Skip to content

MAINT,API: Always export static inline version of array accessor. #25789

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

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

seberg
Copy link
Member

@seberg seberg commented Feb 8, 2024

While we might not hide the struct fully by default, I don't think there is a reason to not only export the static inline versions of these?

They will type check a bit nicer (might give warnings), but otherwise should only matter if you do PyArray_NDIM(arr) = 3.


Or am I missing a reason to even have this? Seems like a relatively mild and good API change to only use the static-inline versions.

While we might not hide the struct fully by default, I don't think
there is a reason to not only export the static inline versions of
these?

They will type check a bit nicer (might give warnings), but otherwise
should only matter if you do `PyArray_NDIM(arr) = 3`.
Copy link
Member

@Mousius Mousius left a comment

Choose a reason for hiding this comment

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

Not entirely sure on the history here but this seems to be straightforward to me as well.

Copy link
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

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

LGTM. One doc nit to make the intention clearer.

[skip cirrus] [skip azp] [skip actions]

Co-authored-by: Matti Picus <[email protected]>
@mattip mattip merged commit 8361485 into numpy:main Feb 8, 2024
@mattip
Copy link
Member

mattip commented Feb 8, 2024

Thanks @seberg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants