[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame.surfarray changes (PixelArray and co.)



So I see you are going with the original plan to have separate modules. That makes sense. But if the non-Numeric module uses the array interface then it doesn't need to be tied to NumPy specifically. The actual array type could be a configurable option. So if a pattern emerges where array packages are obsolesced every few years then a repeat of the Numeric incident could be avoided*.

Lenard

[*] Of course Python 3.0 will break everything. The proposed buffer protocol is a double blow, replacing both the buffer and array interfaces.

René Dudfield wrote:
Numeric will still be the default.  There will be the same behaviour.

So a game that detects if surfarray is available or not will still
work exactly the same if Numeric is present or not.

There is going to be:
surfarray
surfarray_numpy

So if the game is meant to be used with either one then you can use
either one explicitly.

However if you want to try running your code with both you can try -
but numeric and numpy are not the same, so you need to test with both.


On 8/31/07, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
Will the new surfarray and sndarray default to Numeric as the
pygame-ctypes version does? How will one choose which array package to
use? NumPy doesn't just break a program. It can breaks a program
subtly*. So choosing between Numeric and NumPy cannot be automatic.


[*] The arraydemo soften example:
http://aspn.activestate.com/ASPN/Mail/Message/3384142

--
Lenard Lindstrom
<len-l@xxxxxxxxx>