[NumPy-Tickets] [NumPy] #1916: genfromtxt strips brackets from names
NumPy Trac
numpy-tickets@scipy....
Thu Jul 28 08:37:03 CDT 2011
#1916: genfromtxt strips brackets from names
----------------------+-----------------------------------------------------
Reporter: mboquien | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: Unscheduled
Component: Other | Version: 1.6.0
Keywords: |
----------------------+-----------------------------------------------------
genfromtxt systematically strips any bracket ([]) from the name of the
columns. Here is a short snippet exhibitting the problem.
In [1]: from StringIO import StringIO
In [2]: s = StringIO('1 2\n3 4')
In [3]: d = genfromtxt(s,names=['a[1]','a[2]'])
In [4]: d
Out[4]:
array([(1.0, 2.0), (3.0, 4.0)],
dtype=[('a1', '<f8'), ('a2', '<f8')])
Note that 'a[1]' and 'a[2]' have unexpectedly been substituted with 'a1'
and 'a2'.
Thank you very much, regards,
Médéric
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1916>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list