gustaf.utils.arr.rotate#

gustaf.utils.arr.rotate(arr, rotation, rotation_axis=None, degree=True)[source]#

Rotates given arrays. Arrays shape[1] should equal to either 2 or 3 For more information, see rotation_matrix().

Parameters:
  • arr ((n, (2 or 3)) list-like)

  • rotation (list or float) – angle of rotation (around each axis)

  • rotation_axis ((n, (2 or 3)) or (2 or 3) list-like) – center of rotation

Returns:

rotated_points

Return type:

(n, d) np.ndarray