astropy/astropy — pull request #973 by taldcroft (2013-04-12 17:39:55+00:00)
Title: Add_row fails for empty masked table

```
In [1]: from astropy.table import Table

In [2]: t = Table(names=('a'), dtypes=('f'))

In [3]: t
Out[3]:

array([],
dtype=[('a', '
array([(1.0,)],
dtype=[('a', ' in ()
----> 1 tm.add_row([1])

/data/baffin/tom/git/astropy/astropy/table/table.pyc in add_row(self, vals, mask)
1684
1685 if self.masked:
-> 1686 self._data = ma.resize(self._data, (newlen,))
1687 else:
1688 self._data.resize((newlen,), refcheck=False)

/data/cosmos2/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/numpy/ma/core.pyc in resize(x, new_shape)
6460 m = getmask(x)
6461 if m is not nomask:
-> 6462 m = np.resize(m, new_shape)
6463 result = np.resize(x, new_shape).view(get_masked_subclass(x))
6464 if result.ndim:

/data/cosmos2/ska/arch/x86_64-linux_CentOS-5/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc in resize(a, new_shape)
850 a = ravel(a)
851 Na = len(a)
--> 852 if not Na: return mu.zeros(new_shape, a.dtype.char)
853 total_size = um.multiply.reduce(new_shape)
854 n_copies = int(total_size / Na)

TypeError: Empty data-type
```