It's the computer, honest. It keeps changing "user" to "user". Oh no,
not again.
René Dudfield wrote:
hehe, double typo...
'use_arraytype'
http://www.pygame.org/docs/ref/surfarray.html#pygame.surfarray.use_arraytype
On Mon, Mar 2, 2009 at 1:43 PM, Lenard Lindstrom wrote:
A typo. It sh
On Mon, Mar 02, 2009 at 02:06:35PM +1100, René Dudfield wrote:
> hehe, double typo...
>
> 'use_arraytype'
>
> http://www.pygame.org/docs/ref/surfarray.html#pygame.surfarray.use_arraytype
That works better, thanks!
I've refactored PySpaceWar's fading title code into three classes now,
one that u
hehe, double typo...
'use_arraytype'
http://www.pygame.org/docs/ref/surfarray.html#pygame.surfarray.use_arraytype
On Mon, Mar 2, 2009 at 1:43 PM, Lenard Lindstrom wrote:
>
> A typo. It should be user_arraytype.
>
Marius Gedminas wrote:
Try
pygame.surfarray.user_arraytype('numpy')
at the start. NumPy became the default only recently with 1.9.
Unfortunately, this gives me
AttributeError: 'module' object has no attribute 'user_arraytype'
I've got pygame 1.8.1 here (Ubuntu's 1.8.1release-0ubunt
On Sat, Feb 28, 2009 at 10:53:56AM -0800, Lenard Lindstrom wrote:
> Marius Gedminas wrote:
>> On Fri, Feb 27, 2009 at 08:04:30PM -0800, Lenard Lindstrom wrote:
>>> But arithmetic operations have ufunc equivalents which take an
>>> optional output array. This means the astype(), along with its
>>
Marius Gedminas wrote:
On Fri, Feb 27, 2009 at 08:04:30PM -0800, Lenard Lindstrom wrote:
Marius Gedminas wrote:
Since I'm really clueless about
Numeric/numarray/numpy, please tell me if this code has any obvious
shortcomings:
# initialization, done once
import pygame
import numpy
On Fri, Feb 27, 2009 at 08:04:30PM -0800, Lenard Lindstrom wrote:
> Marius Gedminas wrote:
>> Since I'm really clueless about
>> Numeric/numarray/numpy, please tell me if this code has any obvious
>> shortcomings:
>>
>> # initialization, done once
>> import pygame
>> import numpy
>> image =
Marius Gedminas wrote:
On Fri, Feb 27, 2009 at 11:16:28AM +1100, René Dudfield wrote:
hey,
is it possible to use numpy instead of Numeric? Numeric really is
dying now... even we are going to stop trying to keep it working.
I suppose I should. Since I'm really clueless about
Numeric
On Fri, Feb 27, 2009 at 11:16:28AM +1100, René Dudfield wrote:
> hey,
>
> is it possible to use numpy instead of Numeric? Numeric really is
> dying now... even we are going to stop trying to keep it working.
I suppose I should. Since I'm really clueless about
Numeric/numarray/numpy, please tel
hey,
is it possible to use numpy instead of Numeric? Numeric really is
dying now... even we are going to stop trying to keep it working.
cheers,
On Fri, Feb 27, 2009 at 10:49 AM, Marius Gedminas wrote:
> This was a long time ago (shame on me for not finding the time to
> investigate this f
This was a long time ago (shame on me for not finding the time to
investigate this further):
> On Wed, Oct 22, 2008 at 7:23 PM, Marius Gedminas wrote:
> > A user reported that PySpaceWar fails on 64-bit Linux machines if I try
> > to scale the alpha channel. Here's the code (simplified):
> >
> >
Lenard Lindstrom wrote:
It is a two dimension array, so I am surprised the single index slice
[:] even works.
Well, a 2d array can be thought of as a 1d array of 1d arrays,
so you're getting an array of all of those 1d arrays, making
another 2d array.
Seems to work that way in Numeric at leas
Hi Marius,
I am curious, but what happens if array[:] is replaced with array[...].
It is a two dimension array, so I am surprised the single index slice
[:] even works. The alternate form [..] is indifferent to array dimension.
Lenard
Marius Gedminas wrote:
A user reported that PySpaceWar f
I may be having this same error. I've got a bug report with that same
error message at one point (and on a 64-bit machine), even though it
works fine on my (32-bit) machine. Could you try printing out
"array[:].shape"? In my case, I do a sensible slice and somehow end
up with a 0x600 array.
-FM
A user reported that PySpaceWar fails on 64-bit Linux machines if I try
to scale the alpha channel. Here's the code (simplified):
import pygame
import Numeric
image = pygame.image.load('title.png') # has an alpha channel
mask = pygame.surfarray.array_alpha(image).astype(Numeric.
15 matches
Mail list logo