class_docstr: Tests correctness of the Frechet bijector.
code: def testBijector(self):
      # TODO(b/152525415): varied/extreme values, forward(+inf/-inf) and inv(0/1)
      loc = np.array(0.3, dtype=np.float64)
      scale = np.array(5.0, dtype=np.float64)
      concentration = np.array(2.0, dtype=np.float64)
      bijector = frechet_cdf.FrechetCDF(
          loc=loc,
          scale=scale,
          concentration=concentration,
          validate_args=True,
      )
      self.assertStartsWith(bijector.name, "frechet")
      # Frechet distribution
      frechet_dist = stats.invweibull(
          c=concentration, loc=loc, scale=scale
      )
      x = np.array(
          [[[0.3001], [0.8], [2.0], [4.2], [12.0]]], dtype=np.float64
      )
      y = frechet_dist.cdf(x).astype(np.float64)
      self.assertAllClose(y, self.evaluate(bijector.forward(x)))
      x = np.array(
          [[[0.49], [0.8], [2.0], [4.2], [12.0]]], dtype=np.float64
      )
      y = frechet_dist.cdf(x).astype(np.float64)
      # the below tests fail if x < 0.49
      self.assertAllClose(x, self.evaluate(bijector.inverse(y)))
      self.assertAllClose(
          np.squeeze(frechet_dist.logpdf(x), axis=-1),
          self.evaluate(
              bijector.forward_log_det_jacobian(x, event_ndims=1)
          ),
      )
      self.assertAllClose(
          self.evaluate(
              -bijector.inverse_log_det_jacobian(y, event_ndims=1)
          ),
          self.evaluate(
              bijector.forward_log_det_jacobian(x, event_ndims=1)
          ),
          rtol=1e-4,
          atol=0.0,
      )
      with self.assertRaisesOpError(
          r"Forward transformation input.*than `loc`."
      ):
          self.evaluate(bijector.forward(0.1))
      with self.assertRaisesOpError(
          r"Inverse transformation input.* 0."
      ):
          self.evaluate(bijector.inverse(-0.1))
      with self.assertRaisesOpError(
          r"Inverse transformation input.* 1."
      ):
          self.evaluate(bijector.inverse(1.1))
  
file_path: probability/tensorflow_probability/python/bijectors/frechet_cdf_test.py
imports: import numpy
  from scipy import stats
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import bijector_test_util
  from tensorflow_probability.python.bijectors import frechet_cdf
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling the FrechetCDFTest obj's underlying member method code with example usage: obj.testBijector() without return types