Skip to content

NormalizeScale

NormalizeScale()

Bases: BaseTransform

Centers and scales the node positions pos to the interval \((-1, 1)\).

Example:

from mlx_graphs.transforms import NormalizeScale

graph = NormalizeScale()(graph)  # graph.pos.abs().max() < 1
Source code in mlx_graphs/transforms/point_cloud.py
def __init__(self):
    self.center = Center()

from mlx_graphs.transforms import NormalizeScale · mlx_graphs/transforms/point_cloud.py