Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC: fix C API docs for PyArray_Size #28382

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 1 commit into from
Feb 24, 2025

Conversation

tylerjereddy
Copy link
Contributor

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

* The actual C function signature is `PyArray_Size(PyObject *op)`,
and the compiler will issue a warning if you follow the current
C API docs that specify `PyArrayObject*`, so clean this up. I noticed
this while working on numpygh-28355, but it was also mentioned as an aside
7 years ago in numpygh-10977.

[skip azp] [skip cirrus] [skip actions]
@seberg
Copy link
Member

seberg commented Feb 24, 2025

Hah, the function actually includes a PyArray_Check, so object makes a lot of sense... But it returns 0 if it isn't an array :/ (which is a valid size of course).

Anyway, thanks!

@seberg seberg merged commit 40e6489 into numpy:main Feb 24, 2025
3 checks passed
@tylerjereddy tylerjereddy deleted the treddy_issue_10977_size_param branch February 24, 2025 16:46
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.