Affine#

Affine(matrix[, source, target, space])

N-D linear transform, represented by an (N, N) affine matrix, that tracks source and target geometries as well as coordinate space.

Affine Utilities#

transform.identity([ndim])

Identity affine transform.

transform.affine_equal(a, b[, matrix_only, tol])

Test whether two affine transforms are equivalent.

transform.cast_affine(obj[, allow_none, copy])

Cast object to Affine transform.

transform.compose_affine([translation, ...])

Compose an affine matrix from a set of N-D translation, rotation, scale, and shear transform components.

transform.random_affine([translation_range, ...])

Draw a random affine from ranges of transform components.

transform.affine.angles_to_rotation_matrix(...)

Compute an (N, N) rotation matrix from a set of N-D rotation angles.

transform.affine.rotation_matrix_to_angles(matrix)

Compute rotation angle(s) from an (N, N) rotation matrix.