Re: [Numpy-discussion] loading database data into numpy arrays

2010-08-19 Thread John Salvatier
I found the cause of the original problem. pyodbc.cursor.next() returns a pyodbc.Row object, which numpy does not seem to know how to deal with but is essentially an extended tuple. Therefore in order to use the fromiter method to make a numpy structured array from a mysql or other db query, you mu

Re: [Numpy-discussion] loading database data into numpy arrays

2010-08-19 Thread John Salvatier
That worked! Thanks! On Thu, Aug 19, 2010 at 10:18 AM, Keith Goodman wrote: > On Thu, Aug 19, 2010 at 10:00 AM, John Salvatier > wrote: > > Hello, > > > > I am trying to load some time series data into numpy arrays from a MySQL > > database using pyodbc, but I am not sure what the standard way

Re: [Numpy-discussion] loading database data into numpy arrays

2010-08-19 Thread Keith Goodman
On Thu, Aug 19, 2010 at 10:00 AM, John Salvatier wrote: > Hello, > > I am trying to load some time series data into numpy arrays from a MySQL > database using pyodbc, but I am not sure what the standard way to do this > is. I found the following: > http://www.aidanfindlater.com/python-db-api-to-nu

[Numpy-discussion] loading database data into numpy arrays

2010-08-19 Thread John Salvatier
Hello, I am trying to load some time series data into numpy arrays from a MySQL database using pyodbc, but I am not sure what the standard way to do this is. I found the following: http://www.aidanfindlater.com/python-db-api-to-numpy but when I tried after doing a select (I made sure the cursor ha