[Numpy-discussion] Can I add rows and columns to recarray?
Mon Dec 6 16:44:54 CST 2010
On 12/6/10 1:00 PM, Wai Yip Tung wrote:
> Thank you for the quick response and Christopher's explanation on the
> design background.
> But if adding row build a new array, this will lead to O(n^2) complexity.
if you are adding a lot of rows one at a time, yes, you can have
performance issues -- though re-allocating data is pretty fast, too --
maybe it won't matter.
If it does, consider the accumulator code I sent, or use it as
inspiration to write your own.
If you do improve it, please send your improvements back to me.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
More information about the NumPy-Discussion