Fastdigest

Latest version: v0.8.3

Safety actively analyzes 722631 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.8.3

Changelog

Features

- new `centroids` getter property that returns the centroids as a list of (mean, weight) tuples
- new `__iter__` magic method so that `iter(digest)` now returns an iterator over the centroids, semantically consistent with `len(digest)` returning the number of centroids

Bugfixes

- fixed `is_empty` disregarding cached values

Download

All binaries are available on PyPI: https://pypi.org/project/fastdigest/0.8.3/#files

0.8.2

Changelog

Features

- new `is_empty` property to check TDigest status
- further improved `update` performance ~2.4x by increasing the write cache to a reasonable size
- refactored the benchmark script, added a command-line argument for easier switching between incremental/batch-updating

Download

All binaries are available on PyPI: https://pypi.org/project/fastdigest/0.8.2/#files

0.8.1

Changelog

Features

- the module now has a `__version__` attribute

Bugfixes

- fixed serialization by adding the `min` and `max` fields to the dict representation
- added missing checks to `__eq__`
- calling `merge_all` with a non-TDigest object in the Iterable will now raise `TypeError` instead of panicking

Download

All binaries are available on PyPI: https://pypi.org/project/fastdigest/0.8.1/#files

0.8.0

Changelog

Features

- All-new Rust backend with a remix of the [folly-based implementation](https://github.com/MnO2/t-digest/) by MnO2 and the ["OnlineTdigest" suggestion](https://github.com/MnO2/t-digest/pull/2) by kvc0 (but still using the original `estimate_quantile` and `estimate_rank` methods by andylokandy because of their better numerical precision)
- This enables another massive speedup of ~30x for `update`, up to ~10x for serial merge operations, and ~1.5x for `batch_update`
- New `sum()` method

Breaking changes

- `max_centroids` can no longer be `None`
- the lowest/highest centroid are no longer automatically the min/max of the ingested values - therefore explicit "min" and "max" keys are necessary for serialization

Known issues

- `max_centroids` isn't completely precise anymore - digests will sometimes have 1 more centroid than "allowed"
- **serialization is faulty in this version - use v0.8.1+**

0.7.0

Changelog

Features

- The `max_centroids` default value for new TDigest instances is now 1000 instead of `None`. This also applies to instances created from dicts where the key is missing.
- Many new convenience methods: `median()`, `iqr()`, `min()`, `max()`, `probability(x1, x2)`, `mean()`
- `merge_all` now accepts any Iterable of TDigests, rather than just Sequences

Download

All binaries are available on PyPI: https://pypi.org/project/fastdigest/0.7.0/#files

0.6.0

Changelog

Features

- `TDigest` can now exist in an empty state; the `TDigest()` init method **must** now be called without `values`
- new `TDigest.from_values` method to allow direct creation of a TDigest from data
- `merge_all` and `batch_update` now accept empty inputs
- the `rank` method has been renamed to `cdf`

Download

All binaries are available on PyPI: https://pypi.org/project/fastdigest/0.6.0/#files

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.