import tensorflow as tf

        self.evaluate(log_cdf),
        self._scipy_pareto(concentration_v, scale_v).logcdf(x))

    cdf = pareto.cdf(x)
    self.assertEqual(cdf.shape, (6, 3))
    self.assertAllClose(
        self.evaluate(cdf),
        self._scipy_pareto(concentration_v, scale_v).cdf(x))

  def testParetoPDFGradientZeroOutsideSupport(self):
    scale = tf.constant(1.)
    concentration = tf.constant(3.)
    # Check the gradient on the undefined portion.
    x = scale - 1

    pareto = tfd.Pareto(concentration, scale)
    compute_pdf = lambda x: pareto.prob(x)  # pylint:disable=unnecessary-lambda
    self.assertAlmostEqual(self.compute_gradients(
        compute_pdf, args=[x])[0], 0.)

  def testParetoCDFGradientZeroOutsideSupport(self):
    scale = tf.constant(1.)
