[Python-Dev] Expose the array interface in Python 2.5?

Travis E. Oliphant oliphant.travis at ieee.org
Fri Mar 17 09:39:45 CET 2006


Last year, during development of NumPy, the concept of the array 
interface was developed as a means to share array_like data.  It was 
realized that it is this concept that needs to be explored further and 
pushed into Python itself, rather than a particular incarnation of an 
array.

It is very important for many people to get access to memory with some 
description of how that memory should be interpreted as an array. 
Several Python packages could benefit if Python had some notion of an 
array interface that was at least supported in a duck-typing fashion.

The description of what we've come up with so far and is implemented in 
NumPy (and Numarray and last released Numeric) is at

http://numeric.scipy.org/#array_interface

Quite a few of us would love to see this get into Python proper, but 
have very little free-time to spare to make sure it happens.

Would it be possible to add at least the C-struct array interface to the 
Python arrayobject in time for Python 2.5?

Is someone on this list willing to help make it happen?

In NumPy, there is also a reasonably good way to describe the 
"data-type" of arbitrary data, that fell out of the discussions over the 
array interface.  I think something like this could eventually find its 
way into Python as well.

We would love any feedback from the Python community on the array 
interface.  Especially because we'd like to see it in Python itself and 
supported and used by every relevant Python package sooner rather than 
later.

Thanks,

-Travis Oliphant







More information about the Python-Dev mailing list