[Numpy-discussion] Slow conversion from list to arrays
Nadav Horesh
nadavh at visionsense.com
Wed Dec 31 03:07:02 CST 2003
It works excellent. I see also that there is a corresponding update in the CVS.
Happy new (and peaceful) year,
Nadav.
-----Original Message-----
From: Todd Miller [mailto:jmiller at stsci.edu]
Sent: Tue 30-Dec-03 16:34
To: Nadav Horesh
Cc: numpy-discussion
Subject: Re: [Numpy-discussion] Slow conversion from list to arrays
On Thu, 2003-12-25 at 03:27, Nadav Horesh wrote:
> The conversion for a list of large arrays into a matrix is very slow in
> numarray while reasonably fast:
>
> >>> from numarray import *
> >>> a = [arange(200000), arange(200000), arange(200000), arange(200000)]
> >>> aa = array(a) # Very slow
>
> --------------------------------
>
> >>> from Numeric import *
> >>> a = [arange(200000), arange(200000), arange(200000), arange(200000)]
> >>> aa = array(a) # Fast
>
> Python version: 2.3.3
> numarray version: Official 0.8
>
> Tested under WinXP and RH9 linux.
>
> Any workaround?
>
Try concatenate. For the array sizes you're looking at, numarray does
OK. You may have to adjust the result shape.
Todd
> Nadav
>
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
--
Todd Miller
Space Telescope Science Institute
3700 San Martin Drive
Baltimore MD, 21030
(410) 338 - 4576
More information about the Numpy-discussion
mailing list