Yes. I was looking at sound_array_demo.py for instance. It imports
Numeric as well as pygame.sndarray. But what if I wanted it to use
either Numeric or numpy, depending on which one is available. sndarray
already chooses an array package when imported. Why repeat what sndarray
has already done. So a function like get_array(), which returns the
current package, would be useful, unless sndarray.__arraytype is already
part of the public api. Using the surfarray/sndarray choice would also
ensure consistency throughout a multi-module program.
Lenard
René Dudfield wrote:
I think he means to find out which array type is being used?
On Fri, Feb 15, 2008 at 7:04 PM, Marcus von Appen <[EMAIL PROTECTED]> wrote:
On, Fri Feb 15, 2008, Lenard Lindstrom wrote:
> René Dudfield wrote:
>> Hello,
>>
>> I think it's about time to freeze pygame for release.
>>
>> This means we stop adding in features, and make an RC4 release soon
>> for testing, and bug fixes only.
>>
>> So we'll create some binaries for windows, and mac, and release a
>> source tar ball for testing too.
>>
>>
>> But before we do that, is there anyone who wants to get some small
>> last minute features in?
>>
>>
> Playing around with the array examples I think it would be useful if
> surfarray and sndarray exposed __arraytype in a formal way. Then a program
> could let these modules choose which array package to use. Since these
> modules have already gone through the trial an error search for an array
> package, why do it again.
Maybe I'm missing something here, but they already do that and you can
already choose the array package type.
Regards
Marcus