def testEventDtype(self):
    for power_dtype in [tf.float32, tf.float64]:
        for event_dtype in [tf.int32, tf.int64, tf.float32, tf.float64]:
            power_dtype = tf.float32
            event_dtype = tf.int32
            power = tf.constant(5.0, dtype=power_dtype)
            zipf = tfd.Zipf(power=power, dtype=event_dtype, validate_args=True)
            self.assertEqual(zipf.dtype, event_dtype)
            self.assertEqual(zipf.dtype, zipf.sample(10, seed=test_util.test_seed()).dtype)
            self.assertEqual(zipf.dtype, zipf.sample(1, seed=test_util.test_seed()).dtype)
            self.assertEqual(zipf.dtype, zipf.mode().dtype)
def testEventDtype(self):
    for power_dtype in [tf.float32, tf.float64]:
        for event_dtype in [tf.int32, tf.int64, tf.float32, tf.float64]:
            power_dtype = tf.float32
            event_dtype = tf.int32
            power = tf.constant(5.0, dtype=power_dtype)
            zipf = tfd.Zipf(power=power, dtype=event_dtype, validate_args=True)
            self.assertEqual(zipf.dtype, event_dtype)
            self.assertEqual(zipf.dtype, zipf.sample(10, seed=test_util.test_seed()).dtype)
            self.assertEqual(zipf.dtype, zipf.sample(1, seed=test_util.test_seed()).dtype)
            self.assertEqual(zipf.dtype, zipf.mode().dtype)