[Numpy-discussion] Relative speed

Jonathan T. Niehof jniehof@lanl....
Thu Aug 29 10:41:56 CDT 2013

On 08/29/2013 09:33 AM, Anubhab Baksi wrote:
> Hi,
> I need to know about the relative speed (i.e., which one is faster) of
> the followings:
> 1. list and numpy array, tuples and numpy array
> 2. list of tuples and numpy matrix (first one is rectangular)
> 3. random.randint() and numpy.random.random_integers()

African or European?

It really depends on what you're doing with it. The ipython %timeit 
magic is pretty useful for answering that question. Note that the answer 
may change dramatically based on the size of the data set.

Jonathan Niehof
ISR-3 Space Data Systems
Los Alamos National Laboratory
Los Alamos, NM 87545

Phone: 505-667-9595
email: jniehof@lanl.gov

Correspondence /
Technical data or Software Publicly Available

More information about the NumPy-Discussion mailing list