As I got no response to my original email, I figured I'd ask one more time just in case somebody who could answer my question(s) missed it the first time...
Is array_interface actually being deprecated in favor of PEP 3118? If so, when? Are there eventual plans for python-side buffer specification of PEP 3118 protocol, in order for users to be able to use PEP 3118 with ctypes-extended libraries? Besides this list is there anywhere else I can check for this information? The numpy 1.4 documentation seems to suggest that it will be deprecated http://docs.scipy.org/doc/numpy-1.4.x/reference/arrays.interface.html while the 1.6 and current development versions of documentation don't mention deprecation, but simply inform users that PEP 3118 exists as an alternative http://docs.scipy.org/doc/numpy/reference/arrays.interface.html Thus my confusion... - Sam On 7/13/11 6:15 PM, "numpy-discussion-requ...@scipy.org" <numpy-discussion-requ...@scipy.org> wrote: > Message: 3 > Date: Wed, 13 Jul 2011 17:47:59 -0500 > From: Sam Quinan <samqui...@gmail.com> > Subject: [Numpy-discussion] Fate of Numpy's Array Interface > To: <numpy-discussion@scipy.org> > Message-ID: <ca438acf.6070%samqui...@gmail.com> > Content-Type: text/plain; charset="US-ASCII" > > Hey, > > So I'm working on interfacing numpy ndarrays with an n-dimensional array > representation that exists as part of a massive custom C library. Due to the > size of the library, hand-coding a c-extension for the library just was not > really an option; so we wound up using gcc_xml to generate the proper ctypes > code. This works great for accessing our C functions within python, but not > so much for trying share memory between numpy and our custom array > representations... Passing a pointer to the numpy array data to ctypes is > fairly simple, but figuring out the proper way to get memory from ctypes > into numpy has been problematic. > > I know that PEP 3118 is supposed to be superseding the numpy array > interface, but PEP 3118 can only be specified on the C side, which is > problematic for anybody using ctypes to wrap their C code. The legacy > __array_interface__ allows for a python side specification of data buffers, > but there appears to be no corresponding interface capability in the PEP > 3118 protocol. On top of that add the fact that Python's own support for PEP > 3118 has some major bugs (ctypes throwing invalid PEP 3118 codes - > http://bugs.python.org/issue10746 :: issues with python's memoryview object > - http://bugs.python.org/issue10181), and PEP 3118 seems like a nightmare to > deal with. At the same time though, I don't want to simply use the legacy > array interface if it's going to be completely deprecated in the near > future. > > How long before the legacy __array_interface__ goes the way of the dodo? > When that happens, are there plans to add support for a python side > interface to the PEP 3118 protocol? If not, what is the proper way to > interface a ctypes wrapped library with PEP 3118? > > Thanks, > > - Sam Quinan _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion