def testZipfVariance(self):
    power_v = [4.0, 3.0, 5.5]
    zipf = tfd.Zipf(power=power_v)
    self.assertEqual((3,), zipf.variance().shape)
    stat_vars = np.vectorize(stats.zipf.var)(power_v)
    self.assertAllClose(self.evaluate(zipf.variance()), stat_vars)
def testZipfVariance(self):
    power_v = [4.0, 3.0, 5.5]
    zipf = tfd.Zipf(power=power_v)
    self.assertEqual((3,), zipf.variance().shape)
    stat_vars = np.vectorize(stats.zipf.var)(power_v)
    self.assertAllClose(self.evaluate(zipf.variance()), stat_vars)