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
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_",
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
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
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