|
From: Christopher H. <ch...@st...> - 2006-02-15 16:58:39
|
Hi Travis,
I have added a field method to recarray. This allows field access via
either field name or index number.
Example below:
In [1]: from numpy import rec
In [2]: r =
rec.fromrecords([[456,'dbe',1.2],[2,'de',1.3]],names='col1,col2,col3')
In [3]: r.field('col1')
Out[3]: array([456, 2])
In [4]: r.field(0)
Out[4]: array([456, 2])
In [5]: r.field(0)[1]=1000
In [6]: r.field(0)
Out[6]: array([ 456, 1000])
Chris
|