[Numpy-tickets] [NumPy] #462: numpy.rec parser problem

NumPy numpy-tickets@scipy....
Mon Mar 26 18:08:51 CDT 2007


#462: numpy.rec parser problem
-------------------------+--------------------------------------------------
 Reporter:  chanley      |        Owner:  somebody
     Type:  enhancement  |       Status:  new     
 Priority:  high         |    Milestone:          
Component:  numpy.core   |      Version:  devel   
 Severity:  critical     |   Resolution:          
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by chanley):

 I believe that this feature is used primarily for indexing and column
 naming purposes.  For example, if your program is expecting tables of a,
 b, and c but in some cases b isn't applicable to the data set.  It can be
 defined so that column c is always at index 2 without having to rewrite
 your application.  There may be other reasons but I don't know what they
 are.  I have never used this feature.  It is just needed by pyfits to
 support the FITS standard and I have already had one pyfits help call
 regarding it.  It is possible to define this type of array with a pure
 ndarray:

 {{{
 In [5]: x = n.array([],dtype="a8,3f8,0f8,i4,f4,a1,3f4,3f4")

 In [6]: x
 Out[6]:
 array([],
       dtype=[('f0', '|S8'), ('f1', '<f8', 3), ('f2', '<f8', 0), ('f3',
 '<i4'), ('f4', '<f4'), ('f5', '|S1'), ('f6', '<f4', 3), ('f7', '<f4', 3)])

 }}}

 The only argument I can give for going through the effort is to make the
 records.py module more compatible with the NUMARRAY version.

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/462#comment:2>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list