Skip to main content

Module heatmap

Module heatmap 

Expand description

Pure geometry for the objective heatmap: the sampled value grid, its color map, and the mapping from parameter space to the unit square. No window or GPU is involved, so every function is unit tested on the host.

Structs§

Raster
A size × size grid of RGB pixels, row-major from the top (high y) row.

Constants§

GRID
The heatmap’s resolution per axis.

Functions§

color
A perceptually ordered dark-to-light color ramp (viridis stops), t in [0, 1] and clamped outside it. Low values are dark.
raster
Samples a two-parameter problem at pixel centres and colors the values.
unit_point
Maps a parameter point into the unit square: (0, 0) is the bottom-left corner of the box, (1, 1) the top-right. Returns None for a point with the wrong dimension.