<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_entities(self, entity_ids):
 """ Remove entities by index. Parameters entity_ids : (n,) int Indexes of self.entities to remove """

        if len(entity_ids) == 0:
            return
        keep = np.ones(len(self.entities))
        keep[entity_ids] = False
        self.entities = self.entities[keep]