class_docstr: This class generates two samples from the standard normal
  distribution.  These two samples are mixed with n
  mixing coefficients. The coefficients are generated
  by ``np.linspace(0, 1, n_interpolations)``
docstr: This function first draws two samples, and interpolates them
  with self.n_interpolations mixing coefficients.
  
  Location coordinates are set to ``np.ones`` for all the vectors.
code: def layer_op(self):
      """
      This function first draws two samples, and interpolates them
      with self.n_interpolations mixing coefficients.
  
      Location coordinates are set to ``np.ones`` for all the vectors.
      """
      total_iter = self.repeat if self.repeat is not None else 1
      while total_iter > 0:
          total_iter = total_iter - 1 if self.repeat is not None else 1
          embedding_x = np.random.normal(
              self.mean,
              self.stddev,
              self.window.shapes[self.window.names[0]],
          )
          embedding_y = np.random.normal(
              self.mean,
              self.stddev,
              self.window.shapes[self.window.names[0]],
          )
          steps = np.linspace(0, 1, self.n_interpolations)
          for _, mixture in enumerate(steps):
              output_vector = embedding_x * mixture + embedding_y * (
                  1 - mixture
              )
              coordinates = np.ones(
                  (1, N_SPATIAL * 2 + 1), dtype=np.int32
              )
              output_dict = {}
              for name in self.window.names:
                  coordinates_key = LOCATION_FORMAT.format(name)
                  image_data_key = name
                  output_dict[coordinates_key] = coordinates
                  output_dict[image_data_key] = output_vector
              yield output_dict
  
file_path: NiftyNet/niftynet/engine/sampler_random_vector_v2.py
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import tensorflow
  from niftynet.engine.image_window_dataset import ImageWindowDataset
  from niftynet.engine.image_window import N_SPATIAL, LOCATION_FORMAT, ImageWindow
label_desc: Use image node_id 2 for calling the RandomVectorSampler obj's underlying member method code with example usage: obj.layer_op() without return types