[Numpy-discussion] Using dotblas

Fernando Perez Fernando.Perez at colorado.edu
Thu Jun 17 16:28:00 CDT 2004

Hi all,

I've built NumPy 23.1 with dotblas enabled, and as per the readme I'm starting 
to pepper my code with things like:

# External packages
import Numeric as N

# Use BLAS-optimized versions when available
     import dotblas
     N.dot = dotblas._dotblas.matrixproduct
     N.multiarray.innerproduct = dotblas._dotblas.innerproduct
except ImportError:
     print '*** dotblas not available, using regular Numeric functions'

I wonder if this is really necessary, and if so, why.

Is there any reason _not_ to use the dotblas versions when available?  If not, 
shouldn't Numeric itself pick them up internally so that it always exposes the 
fastest possible version?

I can always send in a patch to do this ( a trivial 5-liner like the above 
code), but I may just be missing something, as it seems too obvious not to be 
already the default.



More information about the Numpy-discussion mailing list