New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

heatmapcalc

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heatmapcalc

  • 0.1.6
  • PyPI
  • Socket score

Maintainers
1

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
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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc