def deletecols(X, cols):
if isinstance(cols, str):<EOL><INDENT>cols = cols.split('<STR_LIT:U+002C>')<EOL><DEDENT>retain = [n for n in X.dtype.names if n not in cols]<EOL>if len(retain) > <NUM_LIT:0>:<EOL><INDENT>return X[retain]<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Delete columns from a numpy ndarry or recarray.

Can take a string giving a column name or comma-separated list of column 
names, or a list of string column names.

Implemented by the tabarray method 
:func:`tabular.tab.tabarray.deletecols`.

**Parameters**

        **X** :  numpy recarray or ndarray with structured dtype

                The numpy array from which to delete columns.

        **cols** :  string or list of strings

                Name or list of names of columns in `X`.  This can be
                a string giving a column name or comma-separated list of 
                column names, or a list of string column names.

**Returns**

        **out** :  numpy ndarray with structured dtype

                New numpy ndarray with structured dtype
                given by `X`, excluding the columns named in `cols`.