Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Mark Janikas
anks again! MJ -Original Message- From: numpy-discussion-boun...@scipy.org [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Christopher Barker Sent: Thursday, April 30, 2009 12:16 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Timing array construction Ma

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Bruce Southey
age- > From: numpy-discussion-boun...@scipy.org > [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Eric Firing > Sent: Wednesday, April 29, 2009 11:49 PM > To: Discussion of Numerical Python > Subject: Re: [Numpy-discussion] Timing array construction > > Mark Janikas wro

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Christopher Barker
Mark Janikas wrote: > I have a lot of array constructions in my code that use > NUM.array([list of values])... I am going to replace it with the > empty allocation and insertion. It may not be worth it, depending on where list_of_values comes from/is. A rule of thumb may be: it's going to be slow

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Mark Janikas
ring Sent: Wednesday, April 29, 2009 11:49 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Timing array construction Mark Janikas wrote: > Hello All, > > > > I was exploring some different ways to concatenate arrays, and using > "c_" is the fa

Re: [Numpy-discussion] Timing array construction

2009-04-29 Thread Eric Firing
Mark Janikas wrote: > Hello All, > > > > I was exploring some different ways to concatenate arrays, and using > “c_” is the fastest by far. Is there a difference I am missing that can > account for the huge disparity? Obviously the “zip” function makes the > “as array” and “array” calls sl

[Numpy-discussion] Timing array construction

2009-04-29 Thread Mark Janikas
Hello All, I was exploring some different ways to concatenate arrays, and using "c_" is the fastest by far. Is there a difference I am missing that can account for the huge disparity? Obviously the "zip" function makes the "as array" and "array" calls slower, but the same arguments (xCoords,