No project description provided
Project description
heatmapcalc
heatmapcalc is a minimalistic python package that provides a fast function to
add circles to a numpy array, based on a list of bounding boxes.
It is written in Rust for performance.
Installation
Install with pip:
pip install heatmapcalc
With Rust installed, you can build the package from source:
pip install .
Usage
Here is a simple example:
from heatmapcalc import heatmapcalc
# Example boxes: list of tuples (x1, y1, x2, y2)
boxes = [
(10, 300, 100, 600),
(150, 300, 300, 600),
(250, 215, 450, 425),
(430, 215, 550, 425),
]
# Shape of the heatmap
shape = (600, 800)
# Calculate the heatmap, an np.ndarray of shape (600, 800) and type i64
# Note: The output is NOT normalized - values represent raw overlap counts
heatmap = heatmapcalc(boxes, shape)
This can now be used to visualize it and overlay it on an image. This is shown in the example script.
Development
- Deploy: To deploy on PyPi, trigger the CI workflow on GitHub with the latest commit tag. The workflow builds and uploads the wheels for Linux and MacOS.
- Test: Test with
pytest.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file heatmapcalc-0.1.9-cp314-cp314-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: heatmapcalc-0.1.9-cp314-cp314-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 204.2 kB
- Tags: CPython 3.14, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca2b0559c048d016e82b560e7e6f0a9f6cb2f478b3adfa53e49c7ea858b01296
|
|
| MD5 |
6de7a8779f551dfa1910c6441c435a5e
|
|
| BLAKE2b-256 |
bda813391763a773f2ed021c5f9f581630e50d7fa2a0feb62bc16ed432c2ba02
|
File details
Details for the file heatmapcalc-0.1.9-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: heatmapcalc-0.1.9-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 204.1 kB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7862c215bfca56082b8b159f5f08d2e9a78251d55b62da244322e4433b35fc4
|
|
| MD5 |
bf3a8edfe82da01fb7e4a4076a904086
|
|
| BLAKE2b-256 |
890451a77ce7b6f4d8260eebc28560a0ba01758c7b0564dc372c5506e3f127ab
|
File details
Details for the file heatmapcalc-0.1.9-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: heatmapcalc-0.1.9-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 204.3 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85529bdd1293cc1955de3ee30b3e3640025be5e243e39e09a56007e3de3353da
|
|
| MD5 |
8229dacf41fd70eca927f4c68096828d
|
|
| BLAKE2b-256 |
ff365c061e613f620dfbe5edb43ca15c74a7300801e2664e1a2633e7a7f0ac34
|
File details
Details for the file heatmapcalc-0.1.9-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: heatmapcalc-0.1.9-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 205.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f9c00ec09da7c3739eba6cb41bd14f79c93860bcc0f1ce0ae45b6fd589896b4
|
|
| MD5 |
34cefdee44fe98990bb408682b493bf9
|
|
| BLAKE2b-256 |
da795fa4e1e83d2376dbe58f57379e99c43d743a66fdeb395f046611d0cda378
|