Skip to main content

LogUniform

A simple implementation of the log-uniform and modified log-uniform distributions.

License MIT Travis build PyPI version

How to use

Install it from pip (LogUniform only depends on numpy)

pip install LogUniform

and it’s ready to use from Python

import loguniform

LogUniform comes with two simple classes, LogUniform and ModifiedLogUniform. They are intended to mimic the API of scipy.stats (actually, the log-uniform distribution is already implemented in scipy.stats.reciprocal; the two implementations are compatible).

from loguniform import LogUniform, ModifiedLogUniform

d1 = LogUniform(a=1, b=1000)
d2 = ModifiedLogUniform(knee=1, b=1000)

both distributions d1 and d2 now have methods

  • pdf(x) and logpdf(x): the probability density function and its logarithm

  • cdf(x): cumulative density function

  • ppf(x): percent point function (inverse of cdf)

  • rvs(size): draw random samples from the distribution

  • support(): support of the distribution

License

Copyright 2021 João Faria.

LogUniform is free software made available under the MIT License. For details see the LICENSE file.

Metadata

Release files for LogUniform 2.0.1

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

Source distribution (sdist)

Source distribution for LogUniform 2.0.1
File Size Uploaded
LogUniform-2.0.1.tar.gz 5.1 kB Details

Release files / LogUniform-2.0.1.tar.gz

Download URL LogUniform-2.0.1.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
90bd195d649c1023a4677e4993d486281826e3a546c3fbc99fe7153cc4a483cc
BLAKE2b-256 checksum
How to use checksums
2a866a801397666e6b23c17e7b2d3aa4e4d271dfc204974def9d76eb4f69dc0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Release history Release notifications | RSS feed

This release

2.0.1 This release

1 release file

2.0.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

3 release files

1.0

2 release files

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