def removeCategory(self, categoryToRemove):
removedRows = <NUM_LIT:0><EOL>if self._Memory is None:<EOL><INDENT>return removedRows<EOL><DEDENT>catToRemove = float(categoryToRemove)<EOL>rowsToRemove = [k for k, catID in enumerate(self._categoryList)if catID == catToRemove]<EOL>self._removeRows(rowsToRemove)<EOL>assert catToRemove not in self._categoryList<EOL>
There are two caveats. First, this is a potentially slow operation. Second,
pattern indices will shift if patterns before them are removed.

:param categoryToRemove: Category label to remove