class_docstr: Tests for LAX-backed scipy.spatial implementations
class_docstr_tok: ["Tests","for","LAX-backed","scipy.spatial","implementations"]
code: def testRotationInv(self, shape, dtype):
      rng = jtu.rand_default(self.rng())
      args_maker = lambda: (rng(shape, dtype),)
      jnp_fn = lambda q: jsp_Rotation.from_quat(q).inv().as_rotvec()
      np_fn = (
          lambda q: osp_Rotation.from_quat(q)
          .inv()
          .as_rotvec()
          .astype(dtype)
      )  # HACK
      self._CheckAgainstNumpy(
          np_fn, jnp_fn, args_maker, check_dtypes=True, tol=1e-4
      )
      self._CompileAndCheck(jnp_fn, args_maker, atol=1e-4)
  
imports: from absl.testing import absltest
  import jax
  import scipy.version
  from jax._src import test_util
  from jax.scipy.spatial.transform import Rotation
  from scipy.spatial.transform import Rotation
  from jax.scipy.spatial.transform import Slerp
  from scipy.spatial.transform import Slerp
  import jax.numpy
  import numpy
  from jax import config
label_desc: Use image node_id 17 for calling the LaxBackedScipySpatialTransformTests obj's underlying member method code with example usage: obj.testRotationInv(shape, dtype) without return types