

def remove(self, name):
    ' Remove all data for named entity from the hash table. '
    id_ = self.name_to_id(name)
    id_in_table = ((self.table >> self.maxtimebits) == id_)
    hashes_removed = 0
    for hash_ in np.nonzero(np.max(id_in_table, axis=1))[0]:
        vals = self.table[hash_, :self.counts[hash_]]
        vals = [v for (v, x) in zip(vals, id_in_table[hash_]) if (not x)]
        self.table[hash_] = np.hstack([vals, np.zeros((self.depth - len(vals)))])
        self.counts[hash_] = len(vals)
        hashes_removed += np.sum(id_in_table[hash_])
    self.names[id_] = None
    self.hashesperid[id_] = 0
    self.dirty = True
    print('Removed', name, '(', hashes_removed, 'hashes).')

dataset/ETHPy150Open dpwe/audfprint/hash_table.py HashTable.remove/original