Re: [Numpy-discussion] Problems creating numpy.array with a dtype

2010-05-15 Thread josef . pktd
On Sat, May 15, 2010 at 12:24 AM, Jimmie Houchin jlhouc...@gmail.com wrote: Hello, I am really liking Numpy a lot. It is wonderful to be able to do the things that it does in a language as friendly as Python, and with the performance Numpy delivers over standard Python. Thanks. I am having a

Re: [Numpy-discussion] Problems creating numpy.array with a dtype

2010-05-15 Thread Jimmie Houchin
On 5/15/2010 6:30 AM, josef.p...@gmail.com wrote: On Sat, May 15, 2010 at 12:24 AM, Jimmie Houchinjlhouc...@gmail.com wrote: def getArray(instrument, weekString=None): ... cur.execute(sql) weekData = cur.fetchall() wdata = [] lst = [] dtminute, dttypes =

Re: [Numpy-discussion] Problems creating numpy.array with a dtype

2010-05-15 Thread josef . pktd
On Sat, May 15, 2010 at 9:27 AM, Jimmie Houchin jlhouc...@gmail.com wrote: On 5/15/2010 6:30 AM, josef.p...@gmail.com wrote: On Sat, May 15, 2010 at 12:24 AM, Jimmie Houchinjlhouc...@gmail.com  wrote: def getArray(instrument, weekString=None):      ...      cur.execute(sql)      weekData =

Re: [Numpy-discussion] Problems creating numpy.array with a dtype

2010-05-15 Thread Vincent Davis
the tuple (row) is one element of the structured array. It's possible to have an n-dimensional structured array where each element is a tuple. Also just was looking at this and while you can't do this anarray = np.array([1,2,3], dtype = [('num', int)]) you can anarray =

Re: [Numpy-discussion] Problems creating numpy.array with a dtype

2010-05-15 Thread Robert Kern
On Sat, May 15, 2010 at 08:37, josef.p...@gmail.com wrote: So, I guess, numpy needs the distinction between list and tuples to know what is an element. That's from hitting at this very often, I never looked at the numpy internals for this. This is correct. There is only so much mind-reading

[Numpy-discussion] Problems creating numpy.array with a dtype

2010-05-14 Thread Jimmie Houchin
Hello, I am really liking Numpy a lot. It is wonderful to be able to do the things that it does in a language as friendly as Python, and with the performance Numpy delivers over standard Python. Thanks. I am having a problem with creation of Numpy arrays with my generated dtypes. I am creating