GMDN
A python implementation of XKCD's Geothmetic Meandian ( https://xkcd.com/2435/ )
Simply run
>>> from GMDN import GMDN
>>> GMDN([1, 1, 2, 3, 5])
2.0890566336242085
One can optionally include a limit, for how close the highest and lowest mean/median should be to accept the answer. The limit defaults to 0.00001. Note that the function returns the median of the result.
>>> from GMDN import GMDN
>>> GMDN([1, 1, 2, 3, 5], 1)
2
GMDN can also be used to get a tuple of (arithmetic mean, geometric mean, median), using geothmetic_mean found in GMDN.helpers:
>>> from GMDN.helpers import geothmetic_meandian
>>> geothmetic_meandian([1, 1, 2, 3, 5])
(2.4, 1.97435048583482, 2)
Metadata
Release files for GMDN 1.0.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 | Provenance | Actions |
|---|---|---|---|---|
| GMDN-1.0.1.tar.gz | 2.6 kB | Without provenance | Details for GMDN-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| GMDN-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for GMDN-1.0.1-py3-none-any.whl |
Total release size: 6.4 kB
Release files / GMDN-1.0.1.tar.gz
| Download URL | GMDN-1.0.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77cbc94c53d5bf9aaa8ee6a25b04afa3b2c39c90c6a94147db3d41bda06c0ad7
|
|
BLAKE2b-256 checksum How to use checksums |
b1bae04e17aaeaedeca3bb7142033438f9360045343de0662d10ba7632c6e6ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7
|
Release files / GMDN-1.0.1-py3-none-any.whl
| Download URL | GMDN-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e0f78e100bf5d6cbf38ec8581acbb3888a4ab64e502d14ca4b50c1bc14af3c5
|
|
BLAKE2b-256 checksum How to use checksums |
ccdafc689ba9869b6d982f322c4bd378471a7e19d2890f95070342713ab49956
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.7
|
Security for GMDN 1.0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.