surfa.transform.affine.angles_to_rotation_matrix#

surfa.transform.affine.angles_to_rotation_matrix(rotation, degrees=True)#

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

Parameters
  • rotation (float scalar or array) – 1 (2D) or 3 (3D) rotation angles.

  • degrees (bool) – Define rotation in degrees instead of radians.

Returns

matrix – N-D rotation matrix.

Return type

(N, N) float