[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pygame] surfarray woes
First my question: I have an surfarry.array3d that I created from a surface. Lets call it myarray.
I understand to flip it (horizontally or vertically):
myarray[-1:0:-1,:]
myarray[:,-1:0:-1,:]
but when I was trying to do the "blur" I ran into trouble:
myarray[1:,:,:] += myarray[:-1,:,:]*8
or
myarray[1:,:] += myarray[:-1,:]*8
or
myarray[1:,:] += myarray[1:,:]*1
all return: return array has incorrect type
but
myarray[1:,:] += myarray[:-1,:]
and
myarray[1:,:] += myarray[1:,:]
work!
so I could do it the crappy way and add it eight times, but I was wondering if anyone had an idea of why this could be failing!
Plus when I go to do:
myarray /= 2
I get return array has incorrect type again...
-----
Pete - Thanks for the great tutorials/docs dealing with surfarray & sprites -- coming from SDL in C, I am not used to such wonderful tools!
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org