Numarray, numeric, NumPy, scpy_core ??!!

Tim Hochberg tim.hochberg at ieee.org
Sun Jan 22 17:27:27 EST 2006


Szabolcs Nagy wrote:
>>Basically all I need is vectors and 3x3 matrices.
> 
> 
> hmm
> is numpy really efficient for 3x3 (or 4x4) matrices and vectors?
> 
> IMHO an optimized matrix4x4 class can be much faster (i'm just guessing
> here)
> 
> eg cgtypes is a simple c++ implementation with boost-python wrapper:
> http://cgkit.sourceforge.net/
> 

If you're operating on a single 3x3 or 4x4 matrix, nothing you do in 
Python will be "efficient", by which I assume you mean not all that far 
from C speed; the interpreter overhead is simply too high. If you can 
operate on large blocks of small arrays and vectors at the same time, 
which one can usually do after consuming sufficient coffee, then yes 
numpy can be fast if you're careful.

-tim




More information about the Python-list mailing list