numerical python

Travis Oliphant Oliphant.Travis at
Sat Sep 30 00:13:11 CEST 2000

> More specifically I need to store objects and use their elements in large
> matrix calculations.  I don't really want to go loading a matrix each time I
> need to use one.  The two possibilities I thought of was storing just the
> references to the object elements within the matricies(so I can keep them all
> in memory), or instead using matrix stacks, keeping track of them, an if
> necessary, comiiting them to a database in case of failure somewhere or memory
> problems.  How does numerical python best handle large matricies?

Numerical Python uses references to matrix regions, so you could store all
of your matrices into one big 3-D array and use indexing to access the
"slice" of interest.

The thing to watch out for with large matrices is "slient upcasting" from
single precision to double precision because python scalars are
interpreted as double precision objects.

Copying large chunks of data (especially if it means swapping to disk)
will slow you down.    If you steer clear of such things, Numeric Python
is very fast.


More information about the Python-list mailing list