astropy/astropy — pull request #1187 by hamogu (2013-06-13 21:18:53+00:00)
Title: Fix bug: masked property lost when slicing a masked table

This patch is fixing the following bug:
If a masked table is sliced, then the resulting table obtains the
masked numpy array, but not the self.masked attribute.
Thus, e.g. tab.filled() does not work any longer (it believes that the
table is not masked). This has further consequences, e.g. it makes it
very difficult to ever remove the mask from the table.
```
In [27]: tab = Table([[3,4],[5,6]], masked = True)

In [28]: tab1 = tab[[True, True]]

In [29]: tab.masked
Out[29]: True

In [30]: tab1.masked

In [31]: print tab1.masked
None

In [32]: tab.filled()
Out[32]:

array([(3, 5), (4, 6)],
dtype=[('col0', '
masked_array(data = [(4, 6) (4, 6)],
mask = [(False, False) (False, False)],
fill_value = (999999, 999999),
dtype = [('col0', '