Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Francesc Alted
A Monday 06 December 2010 22:00:29 Wai Yip Tung escrigué: > Thank you for the quick response and Christopher's explanation on the > design background. > > All my tables fit in-memory. I want to explore the data interactively > and relational database is does not provide me a lot of value. > > I w

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Christopher Barker
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. you're welcome. > 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 perfo

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Wai Yip Tung
Thank you for the quick response and Christopher's explanation on the design background. All my tables fit in-memory. I want to explore the data interactively and relational database is does not provide me a lot of value. I was rolling my own library before I come to numpy. Then I find numpy'

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Christopher Barker
On 12/6/10 11:00 AM, Benjamin Root wrote: > numpy.lib.recfunctions has a method for easily adding new columns. cool! There is a lot of other nifty- looking stuff in there too. The OP should really take a look. And maybe an appending function is in order, too. -Chris -- Christopher Barker, P

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Benjamin Root
On Mon, Dec 6, 2010 at 12:26 PM, Christopher Barker wrote: > On 12/5/10 7:56 PM, Wai Yip Tung wrote: > >> I'm fairly new to numpy and I'm trying to figure out the right way to do >> things. Continuing on my question about using recarray as a relation. >> > > note that recarrays (or structured arra

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-06 Thread Christopher Barker
On 12/5/10 7:56 PM, Wai Yip Tung wrote: I'm fairly new to numpy and I'm trying to figure out the right way to do things. Continuing on my question about using recarray as a relation. note that recarrays (or structured arrays, AFAIK, the difference is atturube access only -- I don't use recarra

Re: [Numpy-discussion] Can I add rows and columns to recarray?

2010-12-05 Thread Skipper Seabold
On Sun, Dec 5, 2010 at 10:56 PM, Wai Yip Tung wrote: > I'm fairly new to numpy and I'm trying to figure out the right way to do > things. Continuing on my question about using recarray as a relation. I > have a recarray like this > > > In [339]: arr = np.array([ >    .:     (1, 2.2, 0.0), >  

[Numpy-discussion] Can I add rows and columns to recarray?

2010-12-05 Thread Wai Yip Tung
I'm fairly new to numpy and I'm trying to figure out the right way to do things. Continuing on my question about using recarray as a relation. I have a recarray like this In [339]: arr = np.array([ .: (1, 2.2, 0.0), .: (3, 4.5, 0.0) .: ], .: dty