[Numpy-discussion] Vectorize or rewrite function to work with array inputs?
Sturla Molden
sturla at molden.no
Tue Feb 1 15:19:02 EST 2011
Den 01.02.2011 20:50, skrev John Salvatier:
> I am curious: why you recommend against this?
For the same reason I prefer Fortran 95 over C for numerical
programming: clarity.
> Using the C-API through cython seems more attractive than using the
> Cython-specific numpy features since they need a specific number of
> dimensions
They do not, but the generated code will be faster if you do.
If you use the NumPy C API, you can get faster indexing if the number of
dimensions is known.
Sturla
More information about the NumPy-Discussion
mailing list