docstr: Test fallback log_jac_det in RVTransform produces correct the graph for a
  simple transformation: x**2 -> -log(2*x)
docstr_tok: ["Test","fallback","log_jac_det","in","RVTransform","produces","correct","the","graph","for","a","simple","transformation",":","x","*","*","2","-",">","-log","(","2","*","x",")"]
code: def test_fallback_log_jac_det(self, ndim):
      """
      Test fallback log_jac_det in RVTransform produces correct the graph for a
      simple transformation: x**2 -> -log(2*x)
      """
  
      class SquareTransform(Transform):
          name = "square"
          ndim_supp = ndim
  
          def forward(self, value, *inputs):
              return pt.power(value, 2)
  
          def backward(self, value, *inputs):
              return pt.sqrt(value)
  
      square_tr = SquareTransform()
  
      value = pt.vector("value")
      value_tr = square_tr.forward(value)
      log_jac_det = square_tr.log_jac_det(value_tr)
  
      test_value = np.r_[3, 4]
      expected_log_jac_det = -np.log(2 * test_value)
      if ndim == 1:
          expected_log_jac_det = expected_log_jac_det.sum()
      np.testing.assert_array_equal(
          log_jac_det.eval({value: test_value}), expected_log_jac_det
      )
  
imports: import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  import scipy
  import scipy.special
  from pytensor.graph.basic import equal_computations
  from pymc.distributions.continuous import Cauchy, ChiSquared
  from pymc.logprob.basic import conditional_logp, icdf, logcdf, logp
  from pymc.logprob.transforms import ArccoshTransform, ArcsinhTransform, ArctanhTransform, ChainedTransform, CoshTransform, ErfcTransform, ErfcxTransform, ErfTransform, ExpTransform, LocTransform, LogTransform, ScaleTransform, SinhTransform, TanhTransform, Transform
  from pymc.logprob.utils import ParameterValueError
  from pymc.testing import Rplusbig, Vector, assert_no_rvs
  from tests.distributions.test_transform import check_jacobian_det
label_desc: Use image node_id 1 for calling the TestTransform obj's underlying member method code with example usage: obj.test_fallback_log_jac_det(ndim) and returns: pt, pt