pySHT
pySHT is a Python toolbox for literature-traceable statistical hypothesis testing, with particular emphasis on high-dimensional, joint-parameter, and structured-domain problems.
Documentation: https://kisungyou.com/pysht/
The distribution and import name is pysht. The project is an independently
validated successor to the R package
SHT; it does not treat legacy numerical
output as a correctness oracle.
Status: version 0.1.0 is the initial public release. The scientific surface is correctness-gated, but APIs may still evolve before version 1.0.
Install the release from PyPI:
python -m pip install pysht
Statistical scope
pySHT's public API currently contains 51 canonical Python functions covering
52 of the 54 public statistical routine identities in SHT 0.1.9. Two
algebraically identical R entry points share one Python implementation. The
withheld identities are mean2.2014CLX, whose practical-size Gumbel
calibration failed, and cov1.2012Fisher, whose former audit is not
reproducible through the public path. The public functions are organized by
scientific question rather than re-exported from the top-level package:
pysht.mean: univariate, multivariate, high-dimensional, randomized, sparse, and multi-group mean tests;pysht.variance: one-, two-, and multi-sample variance tests;pysht.covariance: one-, two-, and multi-sample covariance tests;pysht.mean_varianceandpysht.mean_covariance: joint-parameter tests;pysht.equaldist: equality-of-distributions tests;pysht.normalityandpysht.uniformity: goodness-of-fit tests; andpysht.simplex: tests for compositional data on the probability simplex.
The API catalog follows SHT's
original [0]--[10] category order and records every public name.
For example:
from pysht.mean import ttest_1samp
result = ttest_1samp([2.1, 2.4, 1.9, 2.2, 2.5], popmean=2.0)
print(result)
Results are immutable Python objects, but their text display follows the
human-readable style of R's htest objects: method title, data, statistic,
p-value, alternative, degrees of freedom, confidence interval, estimates, and
calibration details when applicable.
Procedure-specific results can additionally report resampling diagnostics, numerical metadata, or component log Bayes factors. The user guide explains how to read and use this output.
Correctness policy
Every shipped method must have a formula ledger, an appropriate literal reference or trusted independent comparator, validation evidence, invariance checks, numerical stress tests, and documented assumptions. Known differences from SHT are recorded in the validation documentation.
The current suite also builds the documentation with warnings treated as errors, checks strict typing and formatting, and verifies installed stable-ABI wheels across Python 3.12--3.14 in CI.
License
MIT. See the license and third-party notices.
Release files for pysht 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pysht-0.1.0.tar.gz | 1.0 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pysht-0.1.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details |
| pysht-0.1.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64, Linux glibc 2.24+ x86-64 | Details |
| pysht-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl | CPython 3.12 | abi3 | macOS 11.0+ x86-64 | Details |
| pysht-0.1.0-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 1.7 MB
Release files / pysht-0.1.0.tar.gz
| Download URL | pysht-0.1.0.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9f4729ae002fb2a4d3eb923df1ec5fffacfd1ac66fa832edc878d686cec1273
|
|
BLAKE2b-256 checksum How to use checksums |
a92c2625ffd9a40460dc0f1ed75746a7bfa5398f414e66b8f2fa8878e3b4bf8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / pysht-0.1.0-cp312-abi3-win_amd64.whl
| Download URL | pysht-0.1.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 309.3 kB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7e69d51b7d10dcac93f7653b7e855e7c422c787de5aafbf193bc7aa999b97d18
|
|
BLAKE2b-256 checksum How to use checksums |
0c16a03b9d181b4e7790a2f02ee1798f009b280e826d6dcf4d9c3094843f93bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / pysht-0.1.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pysht-0.1.0-cp312-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 126.1 kB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
1b42249498ea944d117e13832d3d545931ab5c390afe20f231fc7afe1d7c3929
|
|
BLAKE2b-256 checksum How to use checksums |
f0362905d51084ba9b5c84124c5cc9121ddf6365b3f029be106d8110578550ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / pysht-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl
| Download URL | pysht-0.1.0-cp312-abi3-macosx_11_0_x86_64.whl |
|---|---|
| Size | 120.7 kB |
| Tags | CPython 3.12 abi3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
971b61bdbb3292945e11317e3250d97aa70bad13a80fd3c785a6e657e18c1d8e
|
|
BLAKE2b-256 checksum How to use checksums |
6566dea2193d725e732265c9004da3f1364e3b04d9b070069108646676ce1041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency logRelease files / pysht-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | pysht-0.1.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 117.7 kB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9907fddfa84fab6055d53ef3169dec2920cd3c37b20af94db10c4d48de5a1f28
|
|
BLAKE2b-256 checksum How to use checksums |
79af072cd69cdfa27b3c54cebee924e8471f0b4a777332ef556a3b69ffc94a8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Aug 11, 2026.
Transparency log