Skip to main content

Accurate and efficient normal distribution statistics.

Project description

normie - Python package for normal distribution functions

Examples of use

>>> from normie import cdf, invcdf
>>> cdf(2.0)
0.9772498607635498
>>> invcdf(0.5)
0.0

How it works.

The package uses C code, to be found in src/normie_impl.c

The code uses a built-in function for the cumulative distribution function, and a polynomial approximation for the inverse.

Repository

normie/ Python code src/ C code tests/ Test code tools/ Used by poetry for build/test scripts build.py Defines how the package including C code is built LICENSE MIT License pyproject.toml Poetry is used for building, testing, dev environment... README.md This documentation

Compatibility functions

To make it easier to port code to Python or to make interoperable code, there are functions which are designed to be compatible with Excel functions for quantiles of the normal distribution.

>>> from normie.compat.excel import NORM_INV
>>> NORM_INV(0.23, 1, 0.5)
0.6305765807628632

Note that we don't make any effort to reproduce the exact value given by Excel. In particular, we are not trying to match any bugs (if there are any). We simply define the function NORM_INV to mean exactly what NORM.INV does in Excel, then provide our best possible evaluation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

normie-0.3.2a0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

normie-0.3.2a0-cp39-cp39-manylinux_2_31_armv7l.whl (13.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.31+ ARMv7l

File details

Details for the file normie-0.3.2a0.tar.gz.

File metadata

  • Download URL: normie-0.3.2a0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.2 Linux/5.15.84-v7+

File hashes

Hashes for normie-0.3.2a0.tar.gz
Algorithm Hash digest
SHA256 7b77b0988c43ea3eab29e18eecacce319977e6790faf48f1b5fc0c4d694fdf1d
MD5 98829ed6907883cbbc062121c37a257e
BLAKE2b-256 52b1352b425b3776051beedadd9d1b0c250ba76e27c32f61df80c4979fefcaca

See more details on using hashes here.

File details

Details for the file normie-0.3.2a0-cp39-cp39-manylinux_2_31_armv7l.whl.

File metadata

  • Download URL: normie-0.3.2a0-cp39-cp39-manylinux_2_31_armv7l.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: CPython 3.9, manylinux: glibc 2.31+ ARMv7l
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.2 Linux/5.15.84-v7+

File hashes

Hashes for normie-0.3.2a0-cp39-cp39-manylinux_2_31_armv7l.whl
Algorithm Hash digest
SHA256 c4d8fb565d1a32a47c7e94b3a0d5d6018c0d926d9b05e5053e8f8aab85f7a8fc
MD5 c5cdda56407549bf2fd8e4dcc4e406a0
BLAKE2b-256 88c2cdcd3b9a2b5306029419b57dc6387ad96d86a34636bec3fddafcbdfc45c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page