docstr: Checks we don't sample points with corresponding eigenvalue = 0.
docstr_tok: ["Checks","we","do","n't","sample","points","with","corresponding","eigenvalue","=","0","."]
code: def testSampleElementaryDppPoints(self):
      """Checks we don't sample points with corresponding eigenvalue = 0."""
      n_points, batch_size = 5, 10
      _, eigvals, eigvecs = kernel_over_unit_square(
          n_points, dtype=self.param_dtype
      )
      eigvals = tf.one_hot(1, n_points, dtype=self.param_dtype)
      dpp = dpp_lib.DeterminantalPointProcess(eigvals, eigvecs)
      with _capture_bernoulli_samples() as sampled_edpp_indices:
          dpp.sample(batch_size, seed=test_util.test_seed())
      self.assertLen(sampled_edpp_indices, 1)
      sample = sampled_edpp_indices[0]
      self.assertAllEqual(sample[:, 0], tf.zeros([batch_size]))
      self.assertAllEqual(
          sample[:, 1] * (1 - sample[:, 1]), tf.zeros([batch_size])
      )
      self.assertAllEqual(
          sample[:, 2:], tf.zeros([batch_size, n_points - 2])
      )
  
imports: import contextlib
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import dpp
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
label_desc: Use image node_id 5 for calling the _DppTest obj's underlying member method code with example usage: obj.testSampleElementaryDppPoints() without return types