code: def test_32():
      class O32(MG.O):
          dtype = np.float32
  
          def validate(self, M=None):
              """
              Check that the matrix is (almost) orthogonal.
              """
              if M is None:
                  M = self.matrix
              return np.allclose(
                  np.identity(self.ndims[0], dtype=self.dtype),
                  np.dot(M.T, M),
                  atol=1.0e-06,
              )
  
      a = random_orth(3).matrix.astype(np.float32)
  
      A = O32(a, "xyz")
      B = O32(random_orth(3).matrix.astype(np.float32), "xyz")
      C = MG.product(A, B)
      assert C.dtype == np.float32
  
      ev = ArrayCoordMap.from_shape(C, (20, 30, 40))
      assert ev.values.dtype == np.float32
  
file_path: nipy/nipy/core/reference/tests/test_matrix_groups.py
imports: import numpy
  import pytest
  from scipy.linalg import expm
  import nipy.core.reference.tests.matrix_groups
  from nipy.core.api import ArrayCoordMap
label_desc: Use image node_id 8 for calling a global function with example usage: test_32() and returns: np