

def save(self, name, params=None):
    ' Save hash table to file <name>,\n            including optional addition params\n        '
    if params:
        for key in params:
            self.params[key] = params[key]
    with gzip.open(name, 'wb') as f:
        pickle.dump(self, f, pickle.HIGHEST_PROTOCOL)
    self.dirty = False
    nhashes = sum(self.counts)
    print('Saved fprints for', sum(((n is not None) for n in self.names)), 'files (', nhashes, 'hashes) to', name)
    dropped = (nhashes - sum(np.minimum(self.depth, self.counts)))
    print('Dropped hashes=', dropped, ('(%.2f%%)' % ((100.0 * dropped) / max(1, nhashes))))

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