gibbus
Gibbus is a Python library for fitting smooth univariate probability distributions to data. Instead of committing to a parametric family, it fits a flexible log-concave density by maximum likelihood. One model covers shapes that would otherwise call for a normal, gamma, beta, Weibull, Gumbel, or something in between. Multimodal data is fitted as a mixture of log-concave components.
Fits to simulated data. The bounded and censored fits enable the boundary terms for endpoints where the density falls to zero; the others use default settings. The figure is generated by readme_figure.py.
Installation
pip install gibbus
Gibbus requires Python 3.11 or later, NumPy and SciPy; binary wheels cover Linux x86-64, Windows x86-64 and macOS. Version 0.2 replaces the 0.1 model: its options, diagnostics and saved format differ (see the changelog). See Getting started for source builds and Development for an editable install with the test dependencies.
Example
import numpy as np
from gibbus import Distribution
rng = np.random.default_rng(0)
samples = rng.gamma(2.5, size=400)
model = Distribution().fit(samples, support=(0, np.inf))
model.pdf([0.5, 2.0, 5.0])
model.cdf(2.0)
model.ppf(0.99)
model.mean, model.std
model.sample(100, rng=rng)
Interval-censored observations are given as [lower, upper] rows, with an
infinite bound for left or right censoring. Mixtures take a fixed number of
components or "auto".
intervals = np.column_stack([np.floor(samples), np.floor(samples) + 1])
intervals[samples > 6] = [6, np.inf]
censored = Distribution().fit(intervals, support=(0, np.inf))
bimodal = np.r_[rng.normal(-2, 0.5, 300), rng.normal(2, 0.7, 300)]
mixture = Distribution().fit(bimodal, n_components="auto", rng=0)
mixture.weights
Features
- Exact, interval-censored, and left- or right-censored observations, with optional weights
- Full-line, half-line, and bounded supports, including densities that fall to zero at a boundary, as gamma and beta densities do
- Mixtures with a fixed or automatically chosen number of components
- Tail probabilities and extreme quantiles that remain accurate far past the
point where
1 - cdfloses precision - Moments, entropy, survival and hazard functions, sampling, affine transforms, and truncation
- Goodness-of-fit tests, bootstrap confidence bands, and fit diagnostics
- Fitted models saved as plain NumPy arrays that load without pickle
How it works
Each component has density proportional to exp(-V(x)), where V is a
combination of polynomial, boundary, and tail terms. The fit maximizes the
likelihood subject to V being convex over the whole support, which is the
condition for log-concavity; convexity is checked numerically, to a small
recorded threshold, by a search over the whole support including the tails.
The polynomial degree, and with it the flexibility of the fit, is chosen from
the data. The fitted density is a
closed-form function rather than a grid or a sum of kernels.
See Modeling concepts for details.
Documentation
Citation and license
Citation information is in CITATION.cff. Gibbus is released under the MIT license. Contributions are welcome; see CONTRIBUTING.md.
Metadata
Release files for gibbus 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gibbus-0.2.0.tar.gz | 901.9 kB | With provenance | Details for gibbus-0.2.0.tar.gz |
Built distributions (wheels)
Total release size: 57.4 MB
Release files / gibbus-0.2.0.tar.gz
| Download URL | gibbus-0.2.0.tar.gz |
|---|---|
| Size | 901.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1543858231565bda084a5c7fde1338b640e62f2576ef178ef07d347986a117e8
|
|
BLAKE2b-256 checksum How to use checksums |
50ec4ea0d4bd47ad1130d57d7d77c7a551ad7c49ef72faed4e42aff67e53c085
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp314-cp314-win_amd64.whl
| Download URL | gibbus-0.2.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8ffefb758031e20e3c2fc65a75c2c60e25a144920828e31362006fd084cac155
|
|
BLAKE2b-256 checksum How to use checksums |
1f5158ecdf4aba298948e122cd304beb0f52d4bbbdb85f34ec85c2366720ce8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gibbus-0.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.9 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
bda367b378d8f81ebb6388c5208ef667f9fdba5938d23609c1ac168853264167
|
|
BLAKE2b-256 checksum How to use checksums |
be28ffa253bcba8ad7e3a56ba3a9a7e9309937867159889f5b4fa32dd10acf81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | gibbus-0.2.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7663bcb260992113f1ba3b7040f0e7468299bf21db254a994b37b000e4ca9713
|
|
BLAKE2b-256 checksum How to use checksums |
3f34e223c1795f417b8af796df8f950696e367a8e572421c062d767dc6c88fe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp314-cp314-macosx_10_15_x86_64.whl
| Download URL | gibbus-0.2.0-cp314-cp314-macosx_10_15_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.14 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
4d0fb57961e94fb5302e7b43fe72765838593463ea821fd90df58f313b16fbf0
|
|
BLAKE2b-256 checksum How to use checksums |
98b3cd02e1fb05bad375995b411179674ddd55eda43942eccd946d75e49e9507
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp313-cp313-win_amd64.whl
| Download URL | gibbus-0.2.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6b2640869bc9fde10521f81ce2bd3c32404b74fa92e55637c164c4afa70bc6e6
|
|
BLAKE2b-256 checksum How to use checksums |
706d038b2b8de77d9eaebbdb9310f5c202db15f20bac7edd27d97d6e56fa7b80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gibbus-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.9 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ba5fa90a87ec4e590b9c10a7a75452ad9f8b5e6d28c9f0c4d36f39a5954163b9
|
|
BLAKE2b-256 checksum How to use checksums |
83c487686a0101e34dd44142b72a7816399d95bbca4445e0c68460dac6bb6810
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | gibbus-0.2.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
769b10bffd1736dae2de0002f0592b5f3afcc607b7a9b364adc884435107f821
|
|
BLAKE2b-256 checksum How to use checksums |
9446d4fbeb5e2fc3b41499b5655da1b0421b0366788303fddd2b1b6e02098aa2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | gibbus-0.2.0-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
090e2395e2d8ebd74fbea34656cc87946c292527495d1c3f0b83dc8c3f75bc8d
|
|
BLAKE2b-256 checksum How to use checksums |
8e460fd10ac3791a03ec57c25342c902fe83364de0aeaa99610f8cdde5786eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp312-cp312-win_amd64.whl
| Download URL | gibbus-0.2.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
359145e62606234f06d6f6be7ac9345a6b589575e1e6395e0b7b31d0f9e9e962
|
|
BLAKE2b-256 checksum How to use checksums |
270f93158279a149d1b6a03991f8b421ab97cc23d2928ee799f8cb8dddf3fac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gibbus-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.0 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c0903531bb9b146ad3fe193f2e241536a6f5dc128683892613474559343b5cd
|
|
BLAKE2b-256 checksum How to use checksums |
1513ab0c9bfd5ee128fe8172eef06f2d74dbd9c44592b2fe59d667084d2c813c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | gibbus-0.2.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
130f7c306614b80694e4ceb35f51141f937b3fcea911331666499e3643d990b9
|
|
BLAKE2b-256 checksum How to use checksums |
7a91b7bb1757d1dafa86d0378170cfcf35cf4f083373a983f71fd1063c435f76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | gibbus-0.2.0-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
52e0b3399197f16e944d7af7720faeacb99935dda6a7147041e3506d7e71dfc4
|
|
BLAKE2b-256 checksum How to use checksums |
8b1d86df725d3b9a1c6d6f9029600a03ee6df704cdd068c77a95ed66f98d2e0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp311-cp311-win_amd64.whl
| Download URL | gibbus-0.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
74038768901824b557e5fe0e201814f9515cef856eff22d6cc97b26f582742f1
|
|
BLAKE2b-256 checksum How to use checksums |
04eb535cca6ff4f0907ca44ca01645ebb0ad7f931f514c920f72b0c6676269bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | gibbus-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 9.1 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5df9632c793e645dd4b48844df1e83ae7e8ccc9f39732a03d517035106486342
|
|
BLAKE2b-256 checksum How to use checksums |
5043b7e6cf79b9d673d73ba599a0c2f33e5c67d488d552b6235a82899c9c0b87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | gibbus-0.2.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7b6f4dad68ac68f0cc8cbfa5a415d42ab121178a8a2d0494714369ea13013e64
|
|
BLAKE2b-256 checksum How to use checksums |
c6c274879a642c2e2ed32da9cad08416dadd8b77c80964ccb99c894fc2ab7832
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logRelease files / gibbus-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | gibbus-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f27f1ffb9e1471c57ca0cd378743441e7aa8faf0343f148220e7ee13fd524b7d
|
|
BLAKE2b-256 checksum How to use checksums |
9423166156fdcd06ab22b44e2c1a3de11cb7d361adb9e578aa0142632cfa14fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logSecurity for gibbus 0.2.0
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.
Full provenance
All 17 files in this release have been uploaded with provenance metadata.
Attestation for gibbus-0.2.0.tar.gz
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 Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.