Пример #1
0
def restore_sampler(fname):
    """
    Creates a new sampler from an hdf5 database.
    """
    hf = tables.openFile(fname)
    fnode = hf.root.__sampler__
    sampler = pickle.load(fnode)
    return sampler
Пример #2
0
def restore_sampler(fname):
    """
    Creates a new sampler from an hdf5 database.
    """
    hf = tables.openFile(fname)
    fnode = hf.root.__sampler__
    import pickle
    sampler = pickle.load(fnode)
    return sampler