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

Re: [pygame] What to do with PixelArray?



Hello,

On 30/05/11 04:58 AM, René Dudfield wrote:

On Sun, May 29, 2011 at 11:48 PM, Lenard Lindstrom <len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>> wrote:

    Hi,

    The last few days I've been adding an array struct interface to
    PixelArray. This lets a PixelArray object be converted to another
    type that recognizes the interface, (e.g. a NumPy array, though
    why one would do that is beyond me). However, in doing so I
    uncovered a bug slicing (A unit test exposing the bug was
    committed as rev. 3109). The bug was fixed in rev. 3126.

[snip]


    So I see two options. First, I can revert PixelArray back to
    before I reworked it, since some of the modifications are not
    backward compatible. Then I would add my reworked version as a new
    array type. Second, I can go ahead and make the changes I see as
    necessary, even when they break backward compatibility.
    Specifically for behavior <3>, I would remove it. Instead I would
    provide a transpose method that flips the PixelArray rows and
    columns. No special treatment would be made for (w, 1) and (1, h)
    arrays since special treatment could hide mismatched surface bugs.

[snip]


Hi,

I'm easy with anything you choose. Especially since that module is marked as experimental and has very few users. I'm not sure if adding an extra array type would be a good idea?


cu.
Then I will keep the changes I've already made. None of them break the pixelarray.py example. I will keep any further changes to a minimum.

Lenard