Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Mark Janikas
Thanks Chris and Bruce for the further input. I kindof like the "c_" method because it is still relatively speedy and easy to implement. But, the empty method seems to be closest to what is actually done no matter which direction you go in... I.e. preallocate space and insert. I am in the pro

Re: [Numpy-discussion] Timing array construction

2009-04-30 Thread Bruce Southey
Mark Janikas wrote: > Thanks Eric! > > 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 is indeed twice as fast as "c_" (when it matters, I.e. N is relatively > large): > > "c_",

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
Thanks Eric! 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 is indeed twice as fast as "c_" (when it matters, I.e. N is relatively large): "c_", "empty" 100 0.0007, 0.0230 200

Re: [Numpy-discussion] Splitting multiarray and umath into smaller files: ready for review

2009-04-30 Thread David Cournapeau
2009/4/28 Charles R Harris : > > > I think some of the fixes for too big arrays should be backported to 1.3.x > before this is merged. > That's r6851 and r6853. I'll do that. Ok, I put the changes in the trunk. I will add some documentation as well, cheers, David