[Numpy-discussion] question about optimizing

Bryan Cole bryan@cole.uklinux....
Sat May 17 15:09:21 CDT 2008


> 
> 
> From the response, the answer seems to be no, and that I should stick
> with the python loops for clarity.  But also, the words of Anne
> Archibald, makes me think that I have made a bad choice by inheriting
> from ndarray, although I am not sure what a convenient alternative
> would be.

It may be worth bearing in mind that indexing a python list is faster
than a ndarray (mostly because ndarrays must support many more
features), so if you don't require (or exploit) the features of ndarrays
(i.e. you don't need fancy indexing or element-wise operations), you may
be better off with lists.

BC

> 
> 
> 
> 
> 
> 
> bb
> 
> 
> 
> 
> 
> -- 
> Brian Blais
> bblais@bryant.edu
> http://web.bryant.edu/~bblais
> 
> 
> 
> 
> 
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion




More information about the Numpy-discussion mailing list