[Python-Dev] Expose the array interface in Python 2.5? (original) (raw)
Paul Moore p.f.moore at gmail.com
Fri Mar 17 23:02:07 CET 2006
- Previous message: [Python-Dev] Expose the array interface in Python 2.5?
- Next message: [Python-Dev] Expose the array interface in Python 2.5?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3/17/06, Thomas Heller <theller at python.net> wrote:
Travis E. Oliphant wrote: > Would it be possible to add at least the C-struct array interface to the > Python arrayobject in time for Python 2.5?
I'm very much for that. > Is someone on this list willing to help make it happen? Unfortunately not me - I'm too busy with ctypes, and if the array interface makes it into the core I will have to implement/use that in ctypes too. Accessing Python arrays (Numeric arrays, Numeric array, or Numpy array) as ctypes arrays, and vice versa, without copying any memory, would be a good thing.
This seems to expose the key point here. What exactly is the work that Travis is requesting? (I have very little spare time, no VC7.1 to do builds, but I do have an interest and would possibly be willing to help, if it was clear what was involved...)
If all that is required is a simple C definition added to the Python code, then it seems to me that would be (a) fairly easy, but (b) pretty useless (on the basis that a standards-style PEP like the DB API ones would do much the same, without any code changes).
But as ctypes is now in the core, it seems likely that any addition of an array type to the core would mean that ctypes should support it - which means that the work Thomas mentions is required.
There are quite likely other issues, as well.
On the third hand, the PEP referenced from the page you quote (at http://svn.scipy.org/svn/PEP/PEP_genarray.txt) seems to specify an implementation - are you just asking for that to be added to the core? If so, why not submit this as a formal PEP, and see what happens from there? (For this route, one of the Numeric people needs to champion the PEP, IMHO, as only they are qualified to address any points that get raised in general discussion).
Paul.
- Previous message: [Python-Dev] Expose the array interface in Python 2.5?
- Next message: [Python-Dev] Expose the array interface in Python 2.5?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]