docstr: Quaternion and matrix multiplication are equivalent.
docstr_tok: ["Quaternion","and","matrix","multiplication","are","equivalent","."]
code: def test_quaternion_multiplication(self):
      """Quaternion and matrix multiplication are equivalent."""
      a = random_quaternions(15, torch.float64).reshape((3, 5, 4))
      b = random_quaternions(21, torch.float64).reshape((7, 3, 1, 4))
      ab = quaternion_multiply(a, b)
      self.assertEqual(ab.shape, (7, 3, 5, 4))
      a_matrix = quaternion_to_matrix(a)
      b_matrix = quaternion_to_matrix(b)
      ab_matrix = torch.matmul(a_matrix, b_matrix)
      ab_from_matrix = matrix_to_quaternion(ab_matrix)
      self._assert_quaternions_close(ab, ab_from_matrix)
  
imports: import itertools
  import math
  import unittest
  from distutils.version import LooseVersion
  from typing import Optional, Union
  import numpy
  import torch
  from pytorch3d.transforms.rotation_conversions import axis_angle_to_matrix, axis_angle_to_quaternion, euler_angles_to_matrix, matrix_to_axis_angle, matrix_to_euler_angles, matrix_to_quaternion, matrix_to_rotation_6d, quaternion_apply, quaternion_multiply, quaternion_to_axis_angle, quaternion_to_matrix, random_quaternions, random_rotation, random_rotations, rotation_6d_to_matrix
  from .common_testing import TestCaseMixin
label_desc: Use image node_id 12 for calling the TestRotationConversion obj's underlying member method code with example usage: obj.test_quaternion_multiplication() without return types