docstr: samples: A `Tensor`s of shape [num_samples, num_times, 1] or [batch_shape..., num_samples, num_times, 1].
docstr_tok: ["samples",":","A","`","Tensor","`","s","of","shape","[","num_samples",",","num_times",",","1","]","or","[","batch_shape","...",",","num_samples",",","num_times",",","1","]","."]
code: def get_mean_and_var(self, samples, axis):
      """samples: A `Tensor`s of shape [num_samples, num_times, 1] or [batch_shape..., num_samples, num_times, 1]."""
      # Shape [num_samples, num_times] or [batch_shape..., num_samples, num_times]
      samples_np = self.evaluate(samples[..., -1])
      # Reduce along samples/times dimension:
      # - [num_times] or [batch_shape..., num_times] if axis=-2
      # - [num_samples] or [batch_shape..., num_samples] if axis=-1
      mean = np.mean(samples_np, axis=axis)
      var = np.var(samples_np, axis=axis)
      return mean, var
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
  from tf_quant_finance.math import random_ops
label_desc: Use image node_id 16 for calling the CirTest obj's underlying member method code with example usage: obj.get_mean_and_var(samples, axis) and returns: mean,  var