Passing back an array from an extension module?

Bob Greschke bob at passcal.nmt.edu
Fri Jun 8 15:37:44 EDT 2001


Well, I'm not actually going to be doing any math on the values in the
array, not in an array-wide sense anyway.  The values in the array end
up just being the base values of a graph's y-axis values.  These
numbers are going to be large, so they will all have to be scaled down
on the fly anyway.  Plus, the original values need to be retained in
case the user wants to click on a point to see what the actual value
is, etc.  So this brings me back to really just needing a tuple of
numbers, which I think I can create in, and pass back from a C
function (see another post in this thread), but I'll have to try it
and see how much time it is going to take to do the creation. We're
talking, usually, several hundred thousand points, and, like I said,
up to 16M.  It takes several seconds just to read through each data
file...um...did I mention that there can also be up to about 700 raw
data files?? ;-)

Bob

"Chad Everett" <chat at linuxsupreme.homeip.net> wrote in message
news:slrn9i25fi.tln.chat at linuxsupreme.homeip.net...
> On Fri, 8 Jun 2001 09:28:33 -0600, Bob Greschke
<bob at passcal.nmt.edu> wrote:
> >Is this a job for NumPy?
>
> Page 107 of "Python Essential Reference" re: the array modules
> states: "....The resulting arrays are not suitable for numeric
> work....To create storage- and calculation-efficient arrays, use
> the Numeric extension"  In other works, use NumPy.
>
> If I am interpreting your question correctly, I think the answer
> is 'yes' it's a job for NumPy.





More information about the Python-list mailing list