On, Fri Feb 15, 2008, Lenard Lindstrom wrote: > 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. Okay. I'll add a get_arraytype() method to both, which returns the currently set array type. For consistency, use_array() will be renamed to use_arraytype(). Regards Marcus
Attachment:
pgp4iJiyTP7p6.pgp
Description: PGP signature