Python implementation of Hartigan's dip test for unimodality. Current version 0.11.0 (January 2025). Fast O(n log n) implementation. Pre-compiled wheels for major platforms. Releases are stable but infrequent.
pip install diptestNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compute Hartigan's dip statistic and p-value for unimodality on a sample.
Call dip_pval(dipstat_result, n) where n = len(data).
Update to dip_pval(dip, n) or pin version <0.9.0.
Use with caution for n < 20; consider alternative tests.
Run 'pip install diptest'.
Ensure input data has at least two elements.