hamstest
hamstest estimates arbitrarily small p-values in two-sample permutation tests using hash-augmented adaptive multilevel splitting Monte Carlo.
Installation
pip install hamstest
Native C++ adapters for the bundled KS and Mann-Whitney U tests are optional:
pip install "hamstest[adapters]"
To check whether a native adapter is active while running the estimator, enable debug logging:
import logging
logging.basicConfig(level=logging.DEBUG)
Plotting helpers used by notebooks are optional:
pip install "hamstest[plotting]"
Quick start
from hamstest import Estimator
from hamstest.permutation_tests.kstest import KSTest
test = KSTest(100, 900)
target_score = int(0.333 * 100 * 900)
estimator = Estimator(test, sample_size=101, seed=0)
log_pvalue, log_pvalue_stderr = estimator.estimate(target_score)
test should implement the permutation-test interfaces exported by
hamstest: AbstractPermutationTest and AbstractPermutationTestSubset.
The package also ships reference implementations in hamstest.permutation_tests.
Adapter packages
The package includes the C++ dispatcher and a helper command for starting custom native adapters:
hamstest-adapter-init my_hamstest_adapter --kind my_test
Example adapters for KS and Mann-Whitney U tests are developed in the same
GitHub repository and are published separately. They can be installed together
with hamstest[adapters] or as individual packages:
pip install hamstest-adapter-ks
pip install hamstest-adapter-mannwhitneyu
Project
Source code and issue tracking are available at https://github.com/golikov-nik/hamstest.
Metadata
Release files for hamstest 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hamstest-0.1.1.tar.gz | 17.2 kB | Details |
Built distributions (wheels)
Total release size: 2.4 MB
Release files / hamstest-0.1.1.tar.gz
| Download URL | hamstest-0.1.1.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59ab5037770f0aec433ca04e76f6a7de341a03ab7acc69367bcdf838206f39d1
|
|
BLAKE2b-256 checksum How to use checksums |
675c06f5a4f8ed128d2a01ad09cbedfd93e03d5d17dee44a2ccf54ffc64969ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp313-cp313-win_amd64.whl
| Download URL | hamstest-0.1.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 287.7 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c35467006fec397450b7d02661deb25b95b4410a3e8ae129fac4f5a9507f8a32
|
|
BLAKE2b-256 checksum How to use checksums |
fb90c404131605d0ef0e31b6dac2c68fb0f93f90b2bc3417f1d3845db9173c3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | hamstest-0.1.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 111.3 kB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
61dd90319d09525312e2a807d328e95201d4d747bdbba8f6205dddbe3a91ec18
|
|
BLAKE2b-256 checksum How to use checksums |
315133439fddf92192413e9f5bc9bff14836ac93d04d1caf78535ceca375fdc4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | hamstest-0.1.1-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 94.6 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3a4fcd905f58f66b6bf4016c315d1cd9513878416efa85b6f77de8d3abeae446
|
|
BLAKE2b-256 checksum How to use checksums |
8741bbf677662ee5df4d25e4addcecb0f92678f479fa8edd571018736a168961
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | hamstest-0.1.1-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 98.7 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
eab311cc91d822006f37ae763e3d917f8f70a0e256eb99ee364f9981add33535
|
|
BLAKE2b-256 checksum How to use checksums |
2eec974dea8b456a1c8979a77248913315ea62d68f0ad118578e2f7a3bd7e13f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp312-cp312-win_amd64.whl
| Download URL | hamstest-0.1.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 287.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7260c33125f346277c2ffb51d0e553e7cbed711529f2c9ea15a8b85c249d2275
|
|
BLAKE2b-256 checksum How to use checksums |
3acd4e1a75a261062a8b73dba06ff8fecfb6cf9707947c061610819d52de409d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | hamstest-0.1.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 111.3 kB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
50d0e5efa42e61c2c3e6c463c2225e545703aa833fa9c0cc92200c0c020138fb
|
|
BLAKE2b-256 checksum How to use checksums |
4cfade94d248224da6e4b365893f76380ff6bbed4afe5dd9a61ad8ff208c1b16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | hamstest-0.1.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 94.5 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f82c5426318bfc12051f1ca513a6b8c916115646b98ac8ccc2732d7ecc2f7ecc
|
|
BLAKE2b-256 checksum How to use checksums |
41db81c4266fa102e5895dc6c43b19ad835c898ac959b557f9bd245df1cd0404
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | hamstest-0.1.1-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 98.6 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
1412383014e844fcb40b330f37a50a0386bbde8ca95703717f8e1f8f10431bff
|
|
BLAKE2b-256 checksum How to use checksums |
b1b81dfba802600bbbbae6978f005a143ccb9e9c50772617fb526004a13563d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp311-cp311-win_amd64.whl
| Download URL | hamstest-0.1.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 284.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
22473bc1237793c7f19de39a0ac695329510917966c42bb8c40bb0422303297d
|
|
BLAKE2b-256 checksum How to use checksums |
0e8c8820e194df1102bc2ca0009760380d6139d5a3c4ecb9fa58ceca0221039c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | hamstest-0.1.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 110.2 kB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ec3a4401dd9e3a3dfa72579451c04ed884068b17f5c725a6365da49ae50898fc
|
|
BLAKE2b-256 checksum How to use checksums |
0ed6a6876468a9d9103414e76bd61f9c55e148b059f845d5da692df86c7dcd2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | hamstest-0.1.1-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 93.1 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cc5af8a934ddb80648f6b29e07792b27fc0e1750ef3c393580a0703bcacc15cf
|
|
BLAKE2b-256 checksum How to use checksums |
80657e159fc2bf1fd38b4cddf8c12a2ff37a8fcd7dafcd6012d358a8c65d9e00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | hamstest-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 96.8 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
77118776c039e36323beb30745f358e6aaffa7beaf2cbbd410333bd709bfca84
|
|
BLAKE2b-256 checksum How to use checksums |
f779d1c7c90a0db815832918144aae52428bd7c615255f83152b9d767e0d1617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp310-cp310-win_amd64.whl
| Download URL | hamstest-0.1.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 284.3 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e1b675a1cf762bf906248ad17b3b84b9352cdb69be0f52c4cd9a523f03a5df99
|
|
BLAKE2b-256 checksum How to use checksums |
8b81eda71150b58de298c13ae93eed999e449906b966cb5aa27d5b0aec3b7780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | hamstest-0.1.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 109.4 kB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
80aab7abca3240e7b416157c909b1baabc2a1e7742f117b618659e6fb8c9f227
|
|
BLAKE2b-256 checksum How to use checksums |
218032ddc3428f987d4a42b2deeeeebadae3ff88d38e5b00480fdfae89099963
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | hamstest-0.1.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 92.2 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ce54333879d8929a88dc59e9041389f854ff8bf625a929cfd724115218d89972
|
|
BLAKE2b-256 checksum How to use checksums |
94165ff7546a18c547840bb9bc98daa35aa08c8819834d75b535846681729a03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / hamstest-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | hamstest-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 95.5 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
f9c58be0546a601c163662b46746b15e285701ebcb919bff2267ab4ddee78089
|
|
BLAKE2b-256 checksum How to use checksums |
09dd0a7ee4eb9461830b147badc5afd8f8fa5ab33d69958a1b7e8972920e06de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency log