def __getitem__(self, ind):
if ind in self.coloring.keys():<EOL><INDENT>return self[self.coloring[ind]]<EOL><DEDENT>elif isinstance(ind, list) and self.dtype.names andall([a in self.dtype.names or a in self.coloring.keys()<EOL>for a in ind]) andset(self.coloring.keys()).intersection(ind):<EOL><INDENT>ns = utils.uniqify(utils.listunion([[a] if a in self.dtype.names<EOL>else self.coloring[a] for a in ind]))<EOL>return self[ns]<EOL><DEDENT>else:<EOL><INDENT>D = np.ndarray.__getitem__(self, ind)<EOL>if isinstance(D, np.ndarray) and not (D.dtype.names is None):<EOL><INDENT>D = D.view(tabarray)<EOL>D.coloring = dict([(k,<EOL>list(set(self.coloring[k]).intersection(set(D.dtype.names))))<EOL>for k in self.coloring.keys() if<EOL>len(set(self.coloring[k]).intersection(set(D.dtype.names))) > <NUM_LIT:0>])<EOL><DEDENT>return D<EOL><DEDENT>
Returns a subrectangle of the table.

The representation of the subrectangle depends on `type(ind)`. Also, 
whether the returned object represents a new independent copy of the 
subrectangle, or a "view" into this self object, depends on 
`type(ind)`.

*	If you pass the name of an existing coloring, you get a tabarray 
        consisting of copies of columns in that coloring.

*	If you pass a list of existing coloring names and/or column names, 
        you get a tabarray consisting of copies of columns in the list 
        (name of coloring is equivalent to list of names of columns in that 
        coloring; duplicate columns are deleted).

*	If you pass a :class:`numpy.ndarray`, you get a tabarray consisting 
        a subrectangle of the tabarray, as handled by  
        :func:`numpy.ndarray.__getitem__`:

        *	if you pass a 1D NumPy ndarray of booleans of `len(self)`,    
                the rectangle contains copies of the rows for which the 
                corresponding entry is `True`.

        *	if you pass a list of row numbers, you get a tabarray
                containing copies of these rows.