Re: [pygame] Re: PixelArray versus Surfarray + Numeric/NumPy

2009-01-05 Thread Jordan Applewhite
Marcus:  Thanks for illuminating the difference between PixelArray and
Surfarray.  I'm trying to learn how use additive blending effectively, so I
think I can use either module.
Patrick & Lenard:   Ok, I understand now that I should just use numpy.
 After I looked in the arraydemo.py example I could see that the the changes
needed to use numpy were not very significant.

Also, I'm finding this tutorial:
http://www.scipy.org/Tentative_NumPy_Tutorial#head-b43db272311d8133ab8ba29b6e8ff921da5e792d
to be very helpful.  It seems like numpy would make it fun and easy to
dynamically operate on tile maps, in addition to pixel surfaces.

Many thanks,

Jordan

On Mon, Jan 5, 2009 at 2:24 PM, Lenard Lindstrom  wrote:

> Patrick Mullen wrote:
>
>> On Mon, Jan 5, 2009 at 10:02 AM, Jordan Applewhite
>>  wrote:
>>
>>
>>> Hello again.  I may have posted prematurely.  It seems that the easiest
>>> thing for me to do is to just set up a Python2.4 + Numeric dev
>>> environment
>>> and wait for the incompatibilities to sort themselves out.  I still
>>> welcome
>>> any of your suggestions too my previous questions.
>>>
>>> Thanks again.
>>>
>>>
>>
>> By the way, you do mean python2.5 right?  Python 2.6 and 3.0 are not
>> widely supported yet, but 2.5 is.
>>
>>
> Which platform. On Windows there is a Pygame 1.8.1 installer for Python
> 2.6. And at http://www3.telus.net/len_l/pygame/ there are Pygame 1.9.0a0
> and NumPy 1.2.1 installers. NumPy 1.3 should be released soon and it will
> support Python 2.6. As for the choice between Numeric and NumPy, NumPy is
> now preferable. It was decided that Numeric will no longer be actively
> supported.
>
> Lenard
>
> --
> Lenard Lindstrom
> 
>
>


Re: [pygame] Re: PixelArray versus Surfarray + Numeric/NumPy

2009-01-05 Thread Lenard Lindstrom

Patrick Mullen wrote:

On Mon, Jan 5, 2009 at 10:02 AM, Jordan Applewhite
 wrote:
  

Hello again.  I may have posted prematurely.  It seems that the easiest
thing for me to do is to just set up a Python2.4 + Numeric dev environment
and wait for the incompatibilities to sort themselves out.  I still welcome
any of your suggestions too my previous questions.

Thanks again.



By the way, you do mean python2.5 right?  Python 2.6 and 3.0 are not
widely supported yet, but 2.5 is.
  
Which platform. On Windows there is a Pygame 1.8.1 installer for Python 
2.6. And at http://www3.telus.net/len_l/pygame/ there are Pygame 1.9.0a0 
and NumPy 1.2.1 installers. NumPy 1.3 should be released soon and it 
will support Python 2.6. As for the choice between Numeric and NumPy, 
NumPy is now preferable. It was decided that Numeric will no longer be 
actively supported.


Lenard

--
Lenard Lindstrom




Re: [pygame] Re: PixelArray versus Surfarray + Numeric/NumPy

2009-01-05 Thread Patrick Mullen
On Mon, Jan 5, 2009 at 10:02 AM, Jordan Applewhite
 wrote:
> Hello again.  I may have posted prematurely.  It seems that the easiest
> thing for me to do is to just set up a Python2.4 + Numeric dev environment
> and wait for the incompatibilities to sort themselves out.  I still welcome
> any of your suggestions too my previous questions.
>
> Thanks again.

By the way, you do mean python2.5 right?  Python 2.6 and 3.0 are not
widely supported yet, but 2.5 is.


Re: [pygame] Re: PixelArray versus Surfarray + Numeric/NumPy

2009-01-05 Thread Marcus von Appen
On, Mon Jan 05, 2009, Jordan Applewhite wrote:

> Hello again.  I may have posted prematurely.  It seems that the easiest
> thing for me to do is to just set up a Python2.4 + Numeric dev environment
> and wait for the incompatibilities to sort themselves out.  I still welcome
> any of your suggestions too my previous questions.

[...]

Numpy and Numeric have several differences, but are - in their overall
structure - similar. As you might have read, they support 3D access
(R,G,B). In contrast to them, PixelArray supports only 2D access using
the integer RGBA representation.

if 2D access is enough for you, PixelArray should work well in 90
percent of all cases. It is optimised for the direct surface access, so
that no performance loss through a 3rd party library is given.

(Complex) Mathematical operations and manipulation however might perform
better using Numpy and Numeric, especially in conjunction with the
lapack/atlas (a highly efficient math library) bindings of Numpy.

A better advice could be given, if you tell us your individual needs for
the pixel operations you have to do.

Regards
Marcus


pgpzZjFO7XruI.pgp
Description: PGP signature


[pygame] Re: PixelArray versus Surfarray + Numeric/NumPy

2009-01-05 Thread Jordan Applewhite
Hello again.  I may have posted prematurely.  It seems that the easiest
thing for me to do is to just set up a Python2.4 + Numeric dev environment
and wait for the incompatibilities to sort themselves out.  I still welcome
any of your suggestions too my previous questions.

Thanks again.

On Mon, Jan 5, 2009 at 12:31 PM, Jordan Applewhite <
jordan.applewh...@gmail.com> wrote:

> Hi everyone!  I'm a hobby programmer and new to pygame.  This is my first
> post to the list.
> I've been reading different docs and the the list archives to understand
> how best to move forward with experiments in image blending.  The Surfarray
> tutorial on the docs page is excellent, but a little outdated.  This seems
> to be a transitional period where the documentation and support for NumPy
> have not arrived and the pre-built Windows binaries for NumPy and Numeric
> don't support the latest python.  As an alternative, can I just use
> pygame.PixelArray for all of my realtime blending needs?  Is it too slow?
>
> If not, could anyone point me to some documentation on setting up a Windows
> build environment that will work for compiling pygame, python, and numpy
> together?
>
> Thanks very much for your help!
>
> Jordan
>
>
>
>
>