infomeasure

Which package should I use?

There are two implementations of the same estimator model, and they produce the same numbers. infomeasure, the Python package, is the reference. infomeasure-rs, the Rust crate, is the compiled one. Neither is a subset of the other, so the choice is about your workflow and where the code runs, not about which measures you get.

Start from how you work

Choose Python when the work is exploratory or teaching oriented. The package installs from PyPI or conda-forge, works in notebooks and scripts, and offers the widest surface: statistical tests and composite measures on top of the estimators. Approach selection is by a string argument, which is convenient when the choice is made at runtime.

Choose Rust when the estimator is part of a larger program, when you want a single portable binary with no runtime, or when the input is large enough that the Python runtime becomes the bottleneck. The estimator is selected through the type system, so the choice is checked at compile time. Optional features add GPU evaluation and CPU parallelism without changing the API.

Start from your data

The estimator, not the language, usually decides the answer. The guides cover this in detail and the reasoning is the same in both packages.

Estimator selection guides:

Working across the two

The two packages are kept numerically aligned by continuous parity testing, so a result computed in one can be checked in the other. The Rust crate is also intended to serve as a compiled backend for the Python package, which would let existing Python code gain the speed without changing the workflow. That backend work is on the roadmap rather than released.

A short summary

Choose Python if you wantChoose Rust if you want
Notebooks, teaching and exploratory analysisThe same measures inside a larger program or service
Statistical tests and composite measuresA portable binary with no runtime
The reference implementation to check againstGPU or multi-threaded estimation on large inputs