Hi, I have to use the NumPy C API for my current project and it seems that Cython 0.23.4 it only shipping definitions for on all version of the API. But I need some of the newer methods. What are your plans on updating? Is there anything that prevents you? And if not, how complicated is it? Could a novice like me do it? Thanks Marvin
On Mon, Feb 1, 2016 at 3:22 PM, Marvin Ritter <marvin.ritter@gmail.com> wrote:
Hi,
I have to use the NumPy C API for my current project and it seems that Cython 0.23.4 it only shipping definitions for on all version of the API. But I need some of the newer methods.
What are your plans on updating? Is there anything that prevents you? And if not, how complicated is it? Could a novice like me do it?
Back when this was being actively worked on, the "new" API was so new that we didn't want to make it a dependency, but those days are long past. It would be trivial to add new methods (etc.) to the pxd file at https://github.com/cython/cython/blob/master/Cython/Includes/numpy/__init__.... . Updating the buffer support (e.g. used when writing np.ndarray[int]) to use the new API would be welcome too, but more involved.
Ok, I can update the numpy/__init__.pxd to match the new API and create a pull request for it. How do we want to handle the deprecated methods and types? 1.7 not only added new stuff it also changed return values and type names. If we remove old names user will be forced to update their code. Otherwise we can delay it until NumPy drops the old API. Updating the buffer support sounds like a good idea to me, we would get rid of the deprecation warning, but I think I'm not qualified enough for it. On Tue, Feb 2, 2016 at 12:50 PM, Robert Bradshaw <robertwb@gmail.com> wrote:
On Mon, Feb 1, 2016 at 3:22 PM, Marvin Ritter <marvin.ritter@gmail.com> wrote:
Hi,
I have to use the NumPy C API for my current project and it seems that Cython 0.23.4 it only shipping definitions for on all version of the API. But I need some of the newer methods.
What are your plans on updating? Is there anything that prevents you? And if not, how complicated is it? Could a novice like me do it?
Back when this was being actively worked on, the "new" API was so new that we didn't want to make it a dependency, but those days are long past.
It would be trivial to add new methods (etc.) to the pxd file at
https://github.com/cython/cython/blob/master/Cython/Includes/numpy/__init__.... . Updating the buffer support (e.g. used when writing np.ndarray[int]) to use the new API would be welcome too, but more involved. _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
On Tue, Feb 2, 2016 at 10:43 AM, Marvin Ritter <marvin.ritter@gmail.com> wrote:
Ok, I can update the numpy/__init__.pxd to match the new API and create a pull request for it. How do we want to handle the deprecated methods and types? 1.7 not only added new stuff it also changed return values and type names. If we remove old names user will be forced to update their code. Otherwise we can delay it until NumPy drops the old API.
How about you create a pull request to better visualize exactly what changed. We may need to create two separate numpy files, but ideally we'd be able to do it in such a way that people could migrate their code over before we delete the old definitions.
Updating the buffer support sounds like a good idea to me, we would get rid of the deprecation warning, but I think I'm not qualified enough for it.
Wouldn't hurt to give it a go. IIRC, many of the changes were moving from using direct access (e.g. of structs) to using macros.
On Tue, Feb 2, 2016 at 12:50 PM, Robert Bradshaw <robertwb@gmail.com> wrote:
On Mon, Feb 1, 2016 at 3:22 PM, Marvin Ritter <marvin.ritter@gmail.com> wrote:
Hi,
I have to use the NumPy C API for my current project and it seems that Cython 0.23.4 it only shipping definitions for on all version of the API. But I need some of the newer methods.
What are your plans on updating? Is there anything that prevents you? And if not, how complicated is it? Could a novice like me do it?
Back when this was being actively worked on, the "new" API was so new that we didn't want to make it a dependency, but those days are long past.
It would be trivial to add new methods (etc.) to the pxd file at
https://github.com/cython/cython/blob/master/Cython/Includes/numpy/__init__.... . Updating the buffer support (e.g. used when writing np.ndarray[int]) to use the new API would be welcome too, but more involved. _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
_______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
participants (2)
-
Marvin Ritter -
Robert Bradshaw