Scale.from_data

classmethod Scale.from_data(data)

Creates a Transformation from a data dict.

Parameters

data (dict) – A dictionary with a transformation matrix stored under the key “matrix”.

Returns

Transformation – The Transformation object.

Examples

>>> matrix = [[1, 0, 0, 3], [0, 1, 0, 4], [0, 0, 1, 5], [0, 0, 0, 1]]
>>> data = {'matrix': matrix}
>>> T = Transformation.from_data(data)