Re: [Numpy-discussion] Issue with converting from numpy record to list/tuple

2007-08-28 Thread Sean Davis
On 8/28/07, Francesc Altet <[EMAIL PROTECTED]> wrote: > > A Monday 27 August 2007, Sean Davis escrigué: > > On 8/27/07, Sean Davis <[EMAIL PROTECTED]> wrote: > > > I have a numpy recarray that I want to load into a database using > > > insert statements.

Re: [Numpy-discussion] Issue with converting from numpy record to list/tuple

2007-08-27 Thread Sean Davis
On 8/27/07, Sean Davis <[EMAIL PROTECTED]> wrote: > > I have a numpy recarray that I want to load into a database using insert > statements. To do so, I need to convert each record to a tuple. Here is > what I get (using psycopg2) > > In [1]: a[1] > Out[1]:

[Numpy-discussion] Issue with converting from numpy record to list/tuple

2007-08-27 Thread Sean Davis
I have a numpy recarray that I want to load into a database using insert statements. To do so, I need to convert each record to a tuple. Here is what I get (using psycopg2) In [1]: a[1] Out[1]: ('5151_0023_0001', 'FORWARD', 'interval rank', 'target_tm:76.00 ;probe_tm:70.90;freq:27.93;count:01;ru

Re: [Numpy-discussion] Dict of lists to numpy recarray

2007-08-24 Thread Sean Davis
On 8/24/07, Sean Davis <[EMAIL PROTECTED]> wrote: > > I have a simple question (I assume), but I can't quite get a handle on the > answer. I have a dict with each member a list having a long (>5M > elements). I would like to convert that into a numpy recarray. So fa

[Numpy-discussion] Dict of lists to numpy recarray

2007-08-24 Thread Sean Davis
I have a simple question (I assume), but I can't quite get a handle on the answer. I have a dict with each member a list having a long (>5M elements). I would like to convert that into a numpy recarray. So far, my only thought is to loop over the length of the lists and convert to a list of tupl

[Numpy-discussion] Combining record arrays

2007-07-23 Thread Sean Davis
I am a relatively new numpy user, so sorry for the relatively simple questions. I hope someone can help clarify a couple of things for me. 1) What is the difference between recarrays and arrays created using N.rec.array? If they are different, why use one over the other? 2) How can I add col