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

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.3
File Actions
khisto-1.0.3-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details for khisto-1.0.3-py3-none-win_arm64.whl
khisto-1.0.3-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for khisto-1.0.3-py3-none-win_amd64.whl
khisto-1.0.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for khisto-1.0.3-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
khisto-1.0.3-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64, Linux glibc 2.24+ ARM64 Details for khisto-1.0.3-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
khisto-1.0.3-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for khisto-1.0.3-py3-none-macosx_11_0_arm64.whl
khisto-1.0.3-py3-none-macosx_10_9_x86_64.whl Python 3 none macOS 10.9+ x86-64 Details for khisto-1.0.3-py3-none-macosx_10_9_x86_64.whl

Total release size: 4.2 MB

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

Download URL khisto-1.0.3-py3-none-win_arm64.whl
Size 342.7 kB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
964781c339b17aa2fc592b3d08095e84faa157a408dbd7154f78fb039cbaeec5
BLAKE2b-256 checksum
How to use checksums
789369d75d350f984a445044244bc5d32b8fdadae7e70dbf0e2f31a515cf372f
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 23, 2026.

Transparency log

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

Download URL khisto-1.0.3-py3-none-win_amd64.whl
Size 342.7 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
46b8e6486a09d86549a913ecd20dc187f7b535422388fa3de9b5e09646e99740
BLAKE2b-256 checksum
How to use checksums
9cdaf8730c856e854a8fe4f7b13857dba31d76bbeb5246a25465c74c9c4ebbaa
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 23, 2026.

Transparency log

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

Download URL khisto-1.0.3-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
c4b31f93c658671a88731f60fe60c5478e5758d97072002ea1947507b2dc2573
BLAKE2b-256 checksum
How to use checksums
1cddfb729c059c02758553097ad492e42c35e4791a4b5aa49be74c76297289ed
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 23, 2026.

Transparency log

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

Download URL khisto-1.0.3-py3-none-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Size 992.7 kB
Tags Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
ac0061fce43bfd7ee202b5f8a48614c535a5d495b68328dcc06b0f9d1a55a690
BLAKE2b-256 checksum
How to use checksums
ae3334a06979c8819f4e20f77d2ceeabeae5671f6f100ffd1d1d2dced43fd4ef
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 23, 2026.

Transparency log

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

Download URL khisto-1.0.3-py3-none-macosx_11_0_arm64.whl
Size 700.5 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
aa70bb26f76798f8fa049eefdcbf36117e4303e3c33414446b68e6b969e64e77
BLAKE2b-256 checksum
How to use checksums
0d8cd1a7a4ee06244f3ec98910ddc451824bea4711bb442f4ed843339550f9a2
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 23, 2026.

Transparency log

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

Download URL khisto-1.0.3-py3-none-macosx_10_9_x86_64.whl
Size 780.6 kB
Tags Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
a44e6bcfbb205c4af78a834ca608c56e6330d20a6e9d4ac03c35d9686f914774
BLAKE2b-256 checksum
How to use checksums
822614e3873854a9c4f17629c2c9fc5338a4c9a45c999050f5ccf020eed2a06e
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 23, 2026.

Transparency log

Security for khisto 1.0.3

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.3-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 Oct 23, 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