arrays

Scott David Daniels Scott.Daniels at Acm.Org
Wed Nov 17 15:31:41 EST 2004


Robert Kern wrote:
> Rahul Garg wrote:
>> 1. I will mostly be storing floating point numbers in 2 dimensional
>> arrays which i will pass to a custom module written in C. The
>> application is for scientific computing purposes.I just need python +
>> wxPython for the GUI.
>>
>> 2.I am not using Numarray because i dont expect to do many operations
>> on the matrices in Python itself. Most of that stuff will be handled
>> in my C module.
> 
> You still might want to use numarray or Numeric in this case. The memory 
> representation of a numarray/Numeric array is the same as in C. You 
> won't have to duplicate memory and waste time converting between a 
> memory block of doubles and lists of lists of Python floats. 

If you want to refer to a block of memory that you share with your C
code (especially if the C code controls the memory, you might also want
to check out my "Blocks and Views" code at:

     http://members.dsl-only.net/~daniels/block.html

-Scott David Daniels
Scott.Daniels at Acm.Org




More information about the Python-list mailing list