Skip to main content

Density PDF

Evaluation of univariate density functions defined in the density package.

Install

pip install densitypdf 

Usage

from densitypdf import density_pdf

# Example mixture with one scipy normal and one builtin normal

mixture_spec = {
    "type": "mixture",
    "components": [
        {
            "density": {
                "type": "scipy",
                "name": "norm",
                "params": {"loc": 0, "scale": 1}
            },
            "weight": 0.6
        },
        {
            "density": {
                "type": "builtin",
                "name": "norm",
                "params": {"loc": 2.0, "scale": 1.0}
            },
            "weight": 0.4
        }
    ]
}

val = density_pdf(mixture_spec, x=0.0)

The builtin options are replacements for scipy.stats distributions should you wish to use them.

Specifying densities or mixtures of the same

One is limited to a finite set of continuous distributions, and mixtures of the same.

See examples of specifying densities.

See the Scipy manifest for a list of densities.

Metadata

Release files for densitypdf 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for densitypdf 0.1.4
File Size Uploaded Provenance Actions
densitypdf-0.1.4.tar.gz 12.0 kB Without provenance Details for densitypdf-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for densitypdf 0.1.4
File Interpreter ABI Platform Actions
densitypdf-0.1.4-py3-none-any.whl Python 3 none any Details for densitypdf-0.1.4-py3-none-any.whl

Total release size: 20.3 kB

Release files / densitypdf-0.1.4.tar.gz

Download URL densitypdf-0.1.4.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c9ec5dc48015210db24781ea97bf420bead51c9797da5e42b37c6c832a95e869
BLAKE2b-256 checksum
How to use checksums
accf78797756d5cb18bd07a62686ed9342cdb69f49e0780f386713adca9deca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / densitypdf-0.1.4-py3-none-any.whl

Download URL densitypdf-0.1.4-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31a4f653d367701fff48d98f956a28df5dbfe5c5c383e4be7cf3b92f9a3c2e69
BLAKE2b-256 checksum
How to use checksums
104b3a012548f203ae8bd2a107c50739bc71a6e0b343e3de630d8ceac8bb4a33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Security for densitypdf 0.1.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page