class_docstr: The "sinusoid": P(t) = sin(2pi(t+V)), where V is uniform over [0,1].
class_docstr_tok: ["The","``","sinusoid","''",":","P","(","t",")","=","sin","(","2pi","(","t+V",")",")",",","where","V","is","uniform","over","[","0,1","]","."]
code: def _sample_n(self, n, seed=None):
      ind = self.index_points
      if self.phase is None:
          phase = tf.random.stateless_uniform(
              (n, 1), seed=seed, dtype=self.dtype
          )
      else:
          phase = tf.fill(
              (n, 1), tf.constant(self.phase, dtype=self.dtype)
          )
      return tf.sin((2 * np.pi) * (ind + phase))
  
file_path: compression/models/toy_sources/sinusoid.py
imports: import numpy
  import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 8 for calling the Sinusoid obj's underlying member method code with example usage: obj._sample_n(n, seed) and returns: tf