MCPcopy Create free account
hub / github.com/dcharatan/flowmap / add_label

Function add_label

flowmap/visualization/layout.py:262–273  ·  view source on GitHub ↗
(
    image: Float[Tensor, "3 width height"],
    label: str,
    font: Path = Path("assets/Inter-Regular.otf"),
    font_size: int = 24,
)

Source from the content-addressed store, hash-verified

260
261
262def add_label(
263 image: Float[Tensor, "3 width height"],
264 label: str,
265 font: Path = Path("assets/Inter-Regular.otf"),
266 font_size: int = 24,
267) -> Float[Tensor, "3 width_with_label height_with_label"]:
268 return vcat(
269 draw_label(label, font, font_size, image.device),
270 image,
271 align="left",
272 gap=4,
273 )

Callers 1

visualizeMethod · 0.85

Calls 2

vcatFunction · 0.85
draw_labelFunction · 0.85

Tested by

no test coverage detected