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)  # doctest: +ELLIPSIS
0.97724986...
>>> 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)  # doctest: +ELLIPSIS
0.6305765...

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. This means that you can translate code easily, without having to remember the argument types and conventions for NORM.INV and translate them to the ones used in normie.

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.5.0a3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distributions

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

normie-0.5.0a3-cp311-cp311-win_amd64.whl (9.8 kB view details)

Uploaded CPython 3.11Windows x86-64

normie-0.5.0a3-cp311-cp311-manylinux_2_39_x86_64.whl (15.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

normie-0.5.0a3-cp39-cp39-win_amd64.whl (9.8 kB view details)

Uploaded CPython 3.9Windows x86-64

normie-0.5.0a3-cp39-cp39-manylinux_2_39_x86_64.whl (15.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.39+ x86-64

File details

Details for the file normie-0.5.0a3.tar.gz.

File metadata

  • Download URL: normie-0.5.0a3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.8 Linux/6.8.0-1017-azure

File hashes

Hashes for normie-0.5.0a3.tar.gz
Algorithm Hash digest
SHA256 3ec5c34f8b0d2ba0dcde963fa5582f110c300b084df2a67d04b9e044d598c146
MD5 dc5a2205a4831f4a083c2e313e526d1a
BLAKE2b-256 dd46900a2a933a99cdd3669d224d6e94bb2a7fe41033e3fd5226fb256369b169

See more details on using hashes here.

File details

Details for the file normie-0.5.0a3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: normie-0.5.0a3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.9 Windows/10

File hashes

Hashes for normie-0.5.0a3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 432548ebb8f73bbec229294efdc8f2ecd4b53b90f3d353bde391e46d1ed8ee31
MD5 b75e1fee203d8f7c90aa6af434206f9e
BLAKE2b-256 6251eeaff7c5bcf982ccc9997649099397fbdd080d1bcb6fd19170211222b99b

See more details on using hashes here.

File details

Details for the file normie-0.5.0a3-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

  • Download URL: normie-0.5.0a3-cp311-cp311-manylinux_2_39_x86_64.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: CPython 3.11, manylinux: glibc 2.39+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1017-azure

File hashes

Hashes for normie-0.5.0a3-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 94a39c45826a06c4a62a121502c8e79ec24d6047a164289c71cb8808b5987f75
MD5 4ad765c27983b892cfa2cbf9c68b6706
BLAKE2b-256 5aae4a6e32beca3d703b94f2bb4aa91e8d43cc14a1ca6185f5e0b14003483fd9

See more details on using hashes here.

File details

Details for the file normie-0.5.0a3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: normie-0.5.0a3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.13 Windows/10

File hashes

Hashes for normie-0.5.0a3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 96f6b8b6bf195769cbd3d20fafb0be4a07e4638b30594a51d9e17c8238e09c5c
MD5 ac8dff7ecb43bea5b984bc57115880ba
BLAKE2b-256 346aa913c207f6485afa39747a9afd8c7d5944b2a39704f710c9c9000074b341

See more details on using hashes here.

File details

Details for the file normie-0.5.0a3-cp39-cp39-manylinux_2_39_x86_64.whl.

File metadata

  • Download URL: normie-0.5.0a3-cp39-cp39-manylinux_2_39_x86_64.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: CPython 3.9, manylinux: glibc 2.39+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.9.21 Linux/6.8.0-1017-azure

File hashes

Hashes for normie-0.5.0a3-cp39-cp39-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 56f50a2ea84531afb77fcc1398e2d1be096549f018f8e91807c8b79b986f62d2
MD5 395b5bf543e375ba807a96e4f0bd5301
BLAKE2b-256 93068f8f00a9ae6d135979a8d1dcdd1b0f6d5de5873767d38fc7362fe5d2ce11

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