Re: [Numpy-discussion] Convert recarray to list (is this a bug?)

2012-07-10 Thread Yan Tang
Thank you very much. On Tue, Jul 10, 2012 at 3:02 AM, Travis Oliphant wrote: > > On Jul 9, 2012, at 9:24 PM, Yan Tang wrote: > > Hi, > > I noticed there is an odd issue when I am trying to convert a recarray to > list. See below for the example/test case. > > $ cat a

[Numpy-discussion] Convert recarray to list (is this a bug?)

2012-07-09 Thread Yan Tang
Hi, I noticed there is an odd issue when I am trying to convert a recarray to list. See below for the example/test case. $ cat a.csv date,count 2011-07-25,91 2011-07-26,118 $ cat b.csv name,count foo,1233 bar,100 $ python >>> from matplotlib import mlab >>> import numpy as np >>> a = mlab.csv

Re: [Numpy-discussion] About np array and recarray

2012-03-22 Thread Yan Tang
").date(), i[1]) for > i in a], dtype=[('date', 'object'), ('count', 'int')]) > > Val > > On Wed, Mar 21, 2012 at 11:48 PM, Yan Tang wrote: > >> Hi, >> >> I am really confused on the np array or record array, and cann

Re: [Numpy-discussion] About np array and recarray

2012-03-22 Thread Yan Tang
Thank you very much. Very detailed explanation. On Thu, Mar 22, 2012 at 1:16 AM, Travis Oliphant wrote: > > On Mar 21, 2012, at 11:48 PM, Yan Tang wrote: > > Hi, > > I am really confused on the np array or record array, and cannot > understand how it works. > > What

[Numpy-discussion] About np array and recarray

2012-03-21 Thread Yan Tang
Hi, I am really confused on the np array or record array, and cannot understand how it works. What I want to do is that I have a normal python two dimensional array/list: a = [['2000-01-01', 2],['2000-01-02', 3]] I want to convert it to a recarray with this dtype [('date', 'object'), ('count',