bilby.core.utils.io.encode_astropy_cosmology

bilby.core.utils.io.encode_astropy_cosmology(obj)[source]

Encode an astropy cosmology object to a dictionary.

Adds the key __cosmology__ to the dictionary to indicate that the object is a cosmology object.