Skip to main content
Author:

Jesus Torrado and Antony Lewis

Source:

Source code at GitHub

Documentation:

Documentation at Readthedocs

Licence:

LGPL + bug reporting asap + arXiv’ing of publications using it (see LICENCE.txt for details and exceptions). The documentation is licensed under the GFDL.

E-mail list:

https://cosmocoffee.info/cobaya/ – sign up for important bugs and release announcements!

Support:

For general support, CosmoCoffee; for bugs and issues, use the issue tracker.

Installation:

pip install cobaya --upgrade (see the installation instructions; in general do not clone)

https://github.com/CobayaSampler/cobaya/actions/workflows/tests.yml/badge.svg?branch=master https://readthedocs.org/projects/cobaya/badge/?version=latest https://codecov.io/gh/CobayaSampler/cobaya/branch/master/graphs/badge.svg https://img.shields.io/pypi/v/cobaya.svg?style=flat https://static.pepy.tech/personalized-badge/cobaya?period=total&units=international_system&left_color=grey&right_color=blue&left_text=pypi%20downloads https://img.shields.io/badge/arXiv-2005.05290-b31b1b.svg?color=0B6523

Cobaya (code for bayesian analysis, and Spanish for Guinea Pig) is a framework for sampling and statistical modelling: it allows you to explore an arbitrary prior or posterior using a range of Monte Carlo samplers (including the advanced MCMC sampler from CosmoMC, and the advanced nested sampler PolyChord). The results of the sampling can be analysed with GetDist. It supports MPI parallelization.

Its authors are Jesus Torrado and Antony Lewis. Some ideas and pieces of code have been adapted from other codes (e.g CosmoMC by Antony Lewis and contributors, and Monte Python, by J. Lesgourgues and B. Audren).

Cobaya has been conceived from the beginning to be highly and effortlessly extensible: without touching cobaya’s source code, you can define your own priors and likelihoods, create new parameters as functions of other parameters…

Though cobaya is a general purpose statistical framework, it includes interfaces to cosmological theory codes (CAMB and CLASS) and likelihoods of cosmological experiments (Planck, Bicep-Keck, SDSS… and more coming soon). Automatic installers are included for all those external modules. You can also use cobaya simply as a wrapper for cosmological models and likelihoods, and integrate it in your own sampler/pipeline.

The interfaces to most cosmological likelihoods are agnostic as to which theory code is used to compute the observables, which facilitates comparison between those codes. Those interfaces are also parameter-agnostic, so using your own modified versions of theory codes and likelihoods requires no additional editing of cobaya’s source.

How to cite us

If you use cobaya, please cite its pre-print, arXiv:2005.05290, and its ASCL record, ascl:1910.019.

To appropriately cite the packages (samplers, theory codes, likelihoods) that you have used, simply run the script cobaya-bib with your input file(s) as argument(s), and you will get bibtex references and a short suggested text snippet for each module mentioned in your input file. You can find a usage example here.

Acknowledgements

Thanks to J. Lesgourgues and W. Handley for support on interfacing CLASS and PolyChord respectively.

Thanks too to G. Cañas Herrera, A. Finke, X. Garrido, S. Heimersheim, L. Hergt, C. Hill, P. Lemos, M.S. Madhavacheril, V. Miranda, T. Morton, M. Rashkovetskyi, J. Zunz and many others for extensive and somewhat painful testing.


University of Sussex RWTH Aachen European Research Council STFC

(Copyright for the logos above belongs to their respective institutions.)

Metadata

Release files for cobaya 3.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cobaya 3.6.2
File Size Uploaded
cobaya-3.6.2.tar.gz 416.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cobaya 3.6.2
File Interpreter ABI Platform
cobaya-3.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 911.4 kB

Release files / cobaya-3.6.2.tar.gz

Download URL cobaya-3.6.2.tar.gz
Size 416.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8f1061d6347427f08380e1e0c0b766d695d3978b5439fb0b1cc1a7002152d9c8
BLAKE2b-256 checksum
How to use checksums
559bce0214b39100d71bb40d7fe0525694540c66b0ba3918e4ca5319e64fbaeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.

Transparency log

Release files / cobaya-3.6.2-py3-none-any.whl

Download URL cobaya-3.6.2-py3-none-any.whl
Size 495.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e81da5900442c1a20a0ffa9c1ff212983106a7473b29555cecc2af3e4214da0
BLAKE2b-256 checksum
How to use checksums
333c3ef7ca3d3f3308c5fecaff76fdb836a145b0d805af65b1d8419f01584878
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.6.2 This release

2 release files

3.6.1

2 release files

3.6

2 release files

3.5.7

1 release file

3.5.6

1 release file

3.5.5

1 release file

3.5.4

1 release file

3.5.3

1 release file

3.5.2

1 release file

3.5.1

1 release file

3.5

1 release file

3.4.1

1 release file

3.4

1 release file

3.3.2

1 release file

3.3.1

1 release file

3.3

1 release file

3.2.2

1 release file

3.2.1

1 release file

3.2

1 release file

3.1.1

1 release file

3.1.0

1 release file

3.0.4

1 release file

3.0.3

1 release file

3.0.2

1 release file

3.0.1

1 release file

3.0

1 release file

2.0.5

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

0.126

1 release file

0.125

1 release file

0.124

1 release file

0.123

1 release file

0.122

1 release file

0.120

1 release file

0.119

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page