def to_getdist(nested_samples):
    'Convert from anesthetic to getdist samples.\n\n    Parameters\n    ----------\n    nested_samples: MCMCSamples or NestedSamples\n        anesthetic samples to be converted\n\n    Returns\n    -------\n    getdist_samples: getdist.mcsamples.MCSamples\n        getdist equivalent samples\n    '
    import getdist
    samples = nested_samples.to_numpy()
    weights = nested_samples.weights
    loglikes = ((- 2) * nested_samples.logL.to_numpy())
    names = nested_samples.columns
    ranges = {name: nested_samples._limits(name) for name in names}
    return getdist.mcsamples.MCSamples(samples=samples, weights=weights, loglikes=loglikes, ranges=ranges, names=names)
Convert from anesthetic to getdist samples.

Parameters
----------
nested_samples: MCMCSamples or NestedSamples
    anesthetic samples to be converted

Returns
-------
getdist_samples: getdist.mcsamples.MCSamples
    getdist equivalent samples
def to_getdist(nested_samples):
    'Convert from anesthetic to getdist samples.\n\n    Parameters\n    ----------\n    nested_samples: MCMCSamples or NestedSamples\n        anesthetic samples to be converted\n\n    Returns\n    -------\n    getdist_samples: getdist.mcsamples.MCSamples\n        getdist equivalent samples\n    '
    import getdist
    samples = nested_samples.to_numpy()
    weights = nested_samples.weights
    loglikes = ((- 2) * nested_samples.logL.to_numpy())
    names = nested_samples.columns
    ranges = {name: nested_samples._limits(name) for name in names}
    return getdist.mcsamples.MCSamples(samples=samples, weights=weights, loglikes=loglikes, ranges=ranges, names=names)