[Numpy-discussion] What protocol to use now?

Christopher Barker Chris.Barker@noaa....
Tue Dec 8 12:34:12 CST 2009

Hi folks,

There was just a question on the wxPython list about how to optimize 
some drawing of data in numpy arrays. Currently, wxPython uses 
PySequenceGetItem to iterate through an array, so you can imagine there 
is a fair bit of overhead in that.

But what to use?

We don't want to require numpy, so using the numpy API directly is out.

Using the buffer interface makes it too hard to catch user errors.

The array interface was made for this sort of thing, but is deprecated:


Is the new PEP 3118 protocol now (as of version 1.4) supported by numpy, 
at least for export? At the moment, a one-way street is OK for this 


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the NumPy-Discussion mailing list