Skip to main content

Khisto

CI Docs Release Python License

Optimal Binning Histograms for Python

Khisto is a Python library for creating histograms using the Khiops optimal binning algorithm. Unlike standard histograms that use fixed-width bins or simple heuristics, Khisto automatically determines the optimal number of bins and their variable widths to best represent the underlying data distribution.

Documentation is available at khiopsml.github.io/khisto-python.

Standard Gaussian Heavy-tailed Pareto
Adaptive Gaussian histogram Adaptive Pareto histogram

Installation

pip install khisto

With matplotlib support:

pip install "khisto[matplotlib]"

Quick Start

import numpy as np
import matplotlib.pyplot as plt
from khisto.matplotlib import hist

# Generate 10,000 samples from a Normal distribution
normal_data = np.random.normal(size=10000)

# Plot an adaptive histogram
n, bins, patches = hist(normal_data)
plt.show()

# Generate 10,000 samples from a Pareto distribution
long_tail_data = np.random.pareto(3, size=10000)

# Plot an adaptive histogram on logarithmic axes.
n, bins, patches = hist(long_tail_data)
plt.xscale("symlog")
plt.yscale("log")
plt.show()

Development

On Windows, install Visual Studio Build Tools 2022 with the Desktop development with C++ workload before running the commands below.

# Clone repository
git clone https://github.com/KhiopsML/khisto-python.git
cd khisto-python

# Install with dev dependencies
uv sync --group dev --extra all

# Run tests
uv run pytest

License

BSD 3-Clause Clear License

Metadata

Release files for khisto 1.0.2

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

Built distributions (wheels)

Table of built distributions (wheels) for khisto 1.0.2
File Actions
khisto-1.0.2-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for khisto-1.0.2-py3-none-win_arm64.whl
khisto-1.0.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for khisto-1.0.2-py3-none-win_amd64.whl
khisto-1.0.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 Details for khisto-1.0.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
khisto-1.0.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 Details for khisto-1.0.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
khisto-1.0.2-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for khisto-1.0.2-py3-none-macosx_11_0_arm64.whl
khisto-1.0.2-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details for khisto-1.0.2-py3-none-macosx_10_9_x86_64.whl

Total release size: 4.2 MB

Release files / khisto-1.0.2-py3-none-win_arm64.whl

Download URL khisto-1.0.2-py3-none-win_arm64.whl
Size 341.9 kB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
f5ab08c757c1c5d267442af184d0b31d065f92df6fd817256bdd6fe29040b2e4
BLAKE2b-256 checksum
How to use checksums
a8e2cc6c5a7f52ac1efaf1d8983ed6d1fb77b819377be30affde36b654780515
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release files / khisto-1.0.2-py3-none-win_amd64.whl

Download URL khisto-1.0.2-py3-none-win_amd64.whl
Size 341.9 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
c3115e8bbb9dc7cd533cbce52b9868c4bcb1aed056f7a5daa869767eb644db03
BLAKE2b-256 checksum
How to use checksums
f2da4030e9df37cbf2fd2e134e0a6fd1f9aee50723d6719d23a805b8d85e0778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release files / khisto-1.0.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL khisto-1.0.2-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 1.0 MB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
1097218350985ff97130fed66464dcfe4e26352d0f2cc4ea298acb82ade00603
BLAKE2b-256 checksum
How to use checksums
d49809f458c91cac3ae613e813604032e1dda3dfd95bae49fe963dc7305fbee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release files / khisto-1.0.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl

Download URL khisto-1.0.2-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 991.8 kB
Tags Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
bb1fb10929efa07ec291426e66ee71100e1daa0214dbd02114ad0578e5f8e460
BLAKE2b-256 checksum
How to use checksums
83b9f8ccecb5c1d0739f545945125a7ca410b83e8d60d60a01cfe36d22af80c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release files / khisto-1.0.2-py3-none-macosx_11_0_arm64.whl

Download URL khisto-1.0.2-py3-none-macosx_11_0_arm64.whl
Size 699.7 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
21a0a993d215fc6ccfca3c40be8f3876c26604807de12c409d48cd7495906a3f
BLAKE2b-256 checksum
How to use checksums
74d4ecf2ed6b882b933daf6b62293d23f4a7514e02c3b3cc107dff49a59b5ded
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Release files / khisto-1.0.2-py3-none-macosx_10_9_x86_64.whl

Download URL khisto-1.0.2-py3-none-macosx_10_9_x86_64.whl
Size 779.8 kB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
534029a4271d7c6b32a5b44ddefb6884eb7202770214f2ccb1e15ad140d69f19
BLAKE2b-256 checksum
How to use checksums
190e5703c08f8c16e1d84bd285f418dbb04f06f9e4f13f50adbc3a1dac33f2d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 15, 2026.

Transparency log

Security for khisto 1.0.2

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for khisto-1.0.2-py3-none-win_arm64.whl

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 Sep 15, 2026.

Transparency log

A 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.

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