[Numpy-discussion] trying to speed up the following....

Robert Kern robert.kern@gmail....
Wed Mar 25 03:03:45 CDT 2009

On Wed, Mar 25, 2009 at 03:00, Brennan Williams
<brennan.williams@visualreservoir.com> wrote:

> On a more serious note, it is clear that, as expected, operating on
> elements of an array inside a Python for loop is slow for large arrays.
> Soon I will be writing an import interface to read corner point grid
> geometries and I'm currently looking at vtk unstructured grids etc.
> Most of the numpy vectorization is aimed at relatively simply structured
> arrays on the basis that you'll never meet everyone's needs/data structures.
> So I presume that if I find I have a bottleneck in my code which looks
> specific to my data structures I should then look at offloading that to C or
> Fortran? (assuming I can't find it in numpy or scipy).

If you're comfortable with those languages, and need the speed, yes.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the Numpy-discussion mailing list