class_docstr: Tests for LAX-backed scipy.spatial implementations
class_docstr_tok: ["Tests","for","LAX-backed","scipy.spatial","implementations"]
code: def testRotationApply(self, shape, vector_shape, dtype, inverse):
      rng = jtu.rand_default(self.rng())
      args_maker = lambda: (
          rng(shape, dtype),
          rng(vector_shape, dtype),
      )
      jnp_fn = lambda q, v: jsp_Rotation.from_quat(q).apply(
          v, inverse=inverse
      )
      # TODO(chrisflesher): re-enable this after accounting for sign degeneracy
      # np_fn = lambda q, v: osp_Rotation.from_quat(q).apply(v, inverse=inverse).astype(dtype)  # HACK
      tol = 5e-2 if jtu.test_device_matches(["tpu"]) else 1e-4
      # self._CheckAgainstNumpy(np_fn, jnp_fn, args_maker, check_dtypes=True, tol=tol)
      self._CompileAndCheck(jnp_fn, args_maker, tol=tol)
  
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 1 for calling the LaxBackedScipySpatialTransformTests obj's underlying member method code with example usage: obj.testRotationApply(shape, vector_shape, dtype, inverse) without return types