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

[pygame] Problem in PyGame.SurfArray


A user of glLib reported an error.  The error boils down to:

  File "c:\python27\lib\site-packages\glLib\glLibParticles.py", line 83, in __init__
    surface = pygame.surfarray.make_surface(rgb)
  File "c:\python27\lib\site-packages\pygame\surfarray.py", line 320, in make_surface
    return numpysf.make_surface (array)
  File "c:\python27\lib\site-packages\pygame\_numpysurfarray.py", line 318, in make_surface
    array_to_surface(surface, array)
ValueError: unsupported array type 'f'

The input surface to pygame.surfarray.make_surface is a NumPy float array (n*n*3). 

My PyGame version is '1.9.1release-svn2575', (which I recall is somewhat older) and he reports using "the latest".  I am using Python 2.6, and he is using Python 2.7.  I wasn't able to find where the problem would occur in (my version of) the PyGame source.  I also cannot reproduce the problem. 

Help?  Thanks,