[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] numpy array module now in the pygame development tree
Lenard Lindstrom wrote:
It's good to see. Unfortunately I have already found a bug in the
numpyarray.py module, line 217. A 3d array can also handle 24 bit
pixels. So the third element of the shape needs be calculated.
I have another bug. Attached is a program which raises the following
exception:
Traceback (most recent call last):
File "ac_bug.py", line 6, in <module>
ac = py.numpyarray.array_colorkey(s) # Raises exception
File "C:\PRG\PYTHON25\lib\site-packages\pygame\numpyarray.py", line
309, in ar
ray_colorkey
array = array2d (sf)
NameError: global name 'sf' is not defined
Just a guess, but sf probably should be surface.
--
Lenard Lindstrom
<len-l@xxxxxxxxx>
import pygame as py
py.init()
s = py.Surface((10, 10))
s.set_colorkey((0, 0, 0))
ac = py.numpyarray.array_colorkey(s) # Raises exception