-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
DOC: document PyArray_ResolveWritebackIfCopy #10166
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
DOC: document PyArray_ResolveWritebackIfCopy #10166
Conversation
doc/source/reference/c-api.array.rst
Outdated
@@ -3251,6 +3252,15 @@ Memory management | |||
:c:data:`NPY_USE_PYMEM` is 0, if :c:data:`NPY_USE_PYMEM` is 1, then | |||
the Python memory allocator is used. | |||
|
|||
.. c:function:: PyArray_ResolveWritebackIfCopy(PyArrayObject* obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the return value?
@@ -1357,9 +1357,10 @@ Special functions for NPY_OBJECT | |||
.. c:function:: int PyArray_SetWritebackIfCopyBase(PyArrayObject* arr, PyArrayObject* base) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return value also needs documentation.
My impression was that the deprecation warning was only active when run with PyPy or NumPy was compiled with a special flag. Is that incorrect? |
I think the example in
|
Using Using Only on PyPy (or with the flag) using Edit: correct flag names |
This is the one that worries me as there is no fallback for code intended to work with earlier NumPy versions. SciPy uses it for instance. Also, the official macro name is |
SciPy has already updated for the new behavior scipy/scipy#8150 |
I suppose we could leave it as is and deal with it later if there are complaints. |
Thanks, sorry for not getting everyone on board earlier |
No problem. Merged, thanks @mattip . |
I may have been a bit quick here, shouldn't the example be using |
good catch |
missing from PR #9639, assumes UPDATEIFCOPY will be deprecated