<div class="gmail_quote">On Thu, Jul 15, 2010 at 12:38 PM, Sturla Molden <span dir="ltr"><<a href="mailto:sturla@molden.no">sturla@molden.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Sorry for the previous mispost.<br>
<br>
This thread remids me of something I've though about for a while: Would<br>
NumPy benefit from an np.ndarraylist subclass of np.ndarray, that has an<br>
O(1) amortized append like Python lists? (Other methods of Python lists<br>
(pop, extend) would be worth considering as well.) Or will we get the<br>
same performance by combining a Python list and ndarray?<br>
<font color="#888888"><br></font></blockquote><div><br>Another idea that I always thought was interesting comes from the C++ Standard Library. The .reserve() function call for the vector class, which would go ahead and allocate the specified length, but the array length is not set to that.  It was useful in the case where you have a decent idea of the expected size of the array, but you still have to grow the array iteratively.  Don't know how well that would fit into this context, but I thought I ought to mention that.<br>

<br>Ben Root<br></div></div>