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

[pygame] blit_array() and AMD64


It appears that blit_array() is broken on some systems - I have two users who are getting the following error:

ValueError: unsupported datatype for array

Both of these machines are AMD64 (one Ubuntu, one Gentoo) leading me to believe that might be responsible. I've knocked up the following script which reproduces the error:

 import pygame, Numeric
 surf = pygame.Surface((2,3))
 arr = Numeric.array([[1,2,3],[4,5,6]])

This works fine on all 32 bit machines I have tried, but not on my AMD64 machine.

I noticed that the surf returned by pygame.Surface() translates to an array with 'i' in it, so I tried adding that to the array and blit_array() worked fine:

 arr = N.array([[1,2,3],[4,5,6]], 'i')

Does anyone know what might be going on here? If it is AMD64 related I can imagine I'll be getting much more of these reports in future.