astropy/astropy — pull request #1348 by taldcroft (2013-08-14 16:11:52+00:00)
Title: Bug with include_names option reading an IPAC table

The include_names option doesn't seem to work reading IPAC tables. Here's an example:
```
>>> T = Table([np.arange(10) for i in range(3)], names=['a','b','c'])
>>> T.write('temp.tbl', format='ascii.ipac')
>>> T.read('temp.tbl', format='ascii.ipac', include_names=('a', 'b'))
---------------------------------------------------------------------------
InconsistentTableError Traceback (most recent call last)
in ()
----> 1 T.read('temp.tbl', format='ipac', include_names=('a'))

/usr/local/lib/python2.7/dist-packages/astropy/io/registry.pyc in read(cls, *args, **kwargs)
185
186 reader = get_reader(format, cls)
--> 187 table = reader(*args, **kwargs)
188
189 if not isinstance(table, cls):

/usr/local/lib/python2.7/dist-packages/astropy/io/ascii/connect.pyc in io_read(format, filename, **kwargs)
33 kwargs['guess'] = False
34 format = re.sub(r'^ascii\.', '', format)
---> 35 return read(filename, format=format, **kwargs)
36
37

/usr/local/lib/python2.7/dist-packages/astropy/io/ascii/ui.pyc in read(table, guess, **kwargs)
156 else:
157 reader = get_reader(**new_kwargs)
--> 158 dat = reader.read(table)
159 return dat
160

/usr/local/lib/python2.7/dist-packages/astropy/io/ascii/core.pyc in read(self, table)
896 'Data values: %s' % (len(cols), len(str_vals), i,
897 [x.name for x in cols], str_vals))
--> 898 raise InconsistentTableError(errmsg)
899
900 for col in cols:

InconsistentTableError: Number of header columns (1) inconsistent with data columns (1) at data line 0
Header values: ['a']
Data values: ['0']
```