$npx skillfedfor your agent

emcee

The Python ensemble sampling toolkit for MCMC

Worth itPyPI MathematicsReleased Apr 2024846.6K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — emcee-3.1.6-py2.py3-none-any.whl
v3.1.6 · released 2024-04-19 · 1 runtime deps: numpy

Yes. emcee is a mature, well-maintained library with low install friction, no known vulnerabilities, and a permissive license. It is the standard choice for ensemble MCMC in Python and has proven utility in published research. Install it if you need to perform Bayesian inference or sample from complex posterior distributions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with a single runtime dependency (numpy) and a pure-Python wheel distribution.
  • The package is actively maintained with a recent release and 1597 repository stars, indicating stable community adoption.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted commercial and private use, modification, and distribution with minimal restrictions—suitable for most research and production contexts.

last release 2024-04-19 (847 days) · last repo commit 2026-08-10 · 1,597 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 846,561 downloads/mo, #4,916 on PyPI

Verify before relying

import numpy as np
import emcee

# Define log-probability function
def log_prob(x):
    return -0.5 * np.sum(x**2)

# Initialize sampler with walkers and dimensions
sampler = emcee.EnsembleSampler(n_walkers, n_dims, log_prob)

# Run MCMC
sampler.run_mcmc(initial_state, n_steps)
  • Whether the package supports GPU acceleration or distributed computing beyond standard multiprocessing.
  • Performance characteristics and scalability limits for high-dimensional parameter spaces.
  • Compatibility with modern Python versions (requires_python is unspecified in metadata).
  • Recommended walker count and step count for typical inference problems.
Same gist for agents: .md · .json

What it is and what it does

emcee is a production-grade Python implementation of the affine-invariant ensemble sampler for MCMC, a statistical technique for sampling from complex probability distributions. It is commonly used in Bayesian inference, parameter estimation, and model fitting where you need to explore a posterior distribution and extract credible intervals or point estimates. The package wraps the algorithm proposed by Goodman & Weare (2010) and has been used in published astrophysics research.

The core dependency is numpy, and the package is designed to run on standard Python without compiled extensions. It provides an ensemble-based approach where multiple parallel walkers explore the parameter space, making it well-suited for problems where traditional single-chain samplers would be slow or inefficient. The API is straightforward: define a log-probability function, initialize an EnsembleSampler, and call run_mcmc to generate samples.

Use it for

  • Fitting model parameters to observational data in astronomy or physics by sampling the posterior distribution.
  • Uncertainty quantification in scientific computing where you need credible intervals on fitted parameters.
  • Bayesian model comparison by computing marginal likelihoods or evidence from MCMC chains.
  • Calibrating complex simulators or forward models by inferring input parameters that match observed outputs.
  • Exploratory data analysis in high-dimensional spaces where you need to understand the structure of a probability distribution.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

emcee is a mature, well-maintained library with low install friction, no known vulnerabilities, and a permissive license. It is the standard choice for ensemble MCMC in Python and has proven utility in published research. Install it if you need to perform Bayesian inference or sample from complex posterior distributions.

Install

emcee on PyPI

Before you install

Low install friction with a single runtime dependency (numpy) and a pure-Python wheel distribution. The package is actively maintained with a recent release and 1597 repository stars, indicating stable community adoption.

License in practice

MIT license permits unrestricted commercial and private use, modification, and distribution with minimal restrictions—suitable for most research and production contexts.

Quickstart

import numpy as np
import emcee

# Define log-probability function
def log_prob(x):
    return -0.5 * np.sum(x**2)

# Initialize sampler with walkers and dimensions
sampler = emcee.EnsembleSampler(n_walkers, n_dims, log_prob)

# Run MCMC
sampler.run_mcmc(initial_state, n_steps)

Verify before relying

  • Whether the package supports GPU acceleration or distributed computing beyond standard multiprocessing.
  • Performance characteristics and scalability limits for high-dimensional parameter spaces.
  • Compatibility with modern Python versions (requires_python is unspecified in metadata).
  • Recommended walker count and step count for typical inference problems.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
numpy
MaintenanceActively maintained 847 days since the last release
Last repo commit
First released
Downloads846,561 / month, #4,916 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python

Evidence: emcee-3.1.6-py2.py3-none-any.whl

Tags

Capabilities
MCMC sampling PythonBayesian inference ensembleaffine-invariant samplerposterior estimationGoodman Weare algorithmparallel MCMCparameter fitting Bayesian
Topics
bayesian-inferencestatistical-samplingmcmc

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “Bayesian inference ensemble”

  • emceeemcee implements affine-invariant ensemble sampling for Markov chain…
  • iterative-ensemble-smootherImplements ensemble-based data assimilation and history matching…
  • numpyroNumPyro is a probabilistic programming library that uses JAX for…

Give your agent the search over MCP, or paste the wish link into any chat.

More Mathematics packages

networkx Worth it
PyPI · Python Modules · released Dec 2025

NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.

BSD-3-Clausepure Python
290.9Mdownloads / mo
kiwisolver Worth it
PyPI · Mathematics · released Mar 2026

kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.

Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.

BSD-3-Clausecompiled wheel · 3.10+
205.5Mdownloads / mo
sympy Worth it
PyPI · Scientific/Engineering · released Apr 2025

SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.

BSD-3-Clausepure Python · 3.9+
196.4Mdownloads / mo
contourpy Worth it
PyPI · Information Analysis · released Jul 2025

ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.

BSD-3-Clausecompiled wheel · 3.11+
191.2Mdownloads / mo
torch With conditions
PyPI · Software Development · released Jul 2026

PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.

Apache-2.0 AND Apache-2.0 WITH LLVM-exception AND BSD-2-Clause AND BSD-3-Clause AND BSL-1.0 AND MITcompiled wheel · 3.10+
102.5Mdownloads / mo
onnxruntime Worth it
PyPI · Software Development · released Jul 2026

onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.

Install it if you have ONNX models to run in production or development.

MITcompiled wheel · 3.11+
89.3Mdownloads / mo

See also iterative-ensemble-smoother · pymc3 · tensorflow-probability · pymc · nutpie · pymc-extras · cmdstanpy · httpstan · numpyro · google-meridian