Histogram data in bins but there are 2**64 (almost un-bound) bins.
Project description
This UnBoundhHistogram has bins with a fixed width. But if needed, it offers an almost un-bound amount of 2**64 bins. Making a histogram in an almost un bound range is usefule when one does not know the range of the data in advance and when streaming thrhough the data is costly. UnBoundhHistogram was created to histogram vast streams of data generated in costly simulations for particle physics. Buzz word bingo: big data.
Install
pip install un_bound_histogram
Usage
import un_bound_histogram
import numpy
prng = numpy.random.Generator(numpy.random.PCG64(1337))
h = un_bound_histogram.UnBoundHistogram(bin_width=0.1)
h.assign(x=prng.normal(loc=5.0, scale=2.0, size=1000000))
# assign multiple times to grow the histogram.
h.assign(x=prng.normal(loc=-3.0, scale=1.0, size=1000000))
h.assign(x=prng.normal(loc=1.0, scale=0.5, size=1000000))
assert 0.9 < h.percentile(50) < 1.1
assert h.sum() == 3 * 1000000
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file un_bound_histogram-0.0.1.tar.gz
.
File metadata
- Download URL: un_bound_histogram-0.0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c75470062c7a6fdcc337931a48ec041136ab3a06edb69341c27b62cccbe0639 |
|
MD5 | 39e847d978527f7cc9a7b521731f9d76 |
|
BLAKE2b-256 | 34ce098d4b53c0125c2228daf36ae6968d6a34a408b3fc766905681b7db8036e |
File details
Details for the file un_bound_histogram-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: un_bound_histogram-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75e9f5253c6e712d7a55aac82e49f3daa4f0947a9a1884d2da35123137316fff |
|
MD5 | 90651883bf265cba28c4c87c5ff1415b |
|
BLAKE2b-256 | cef91c2a9e73172681b067f5986fd7f26ffa747ecac0dc69440d9201c0c036e4 |