docstr: Tests path samples have the right properties.
docstr_tok: ["Tests","path","samples","have","the","right","properties","."]
code: def test_path_properties_1d(self):
      """Tests path samples have the right properties."""
      process = BrownianMotion()
      times = np.array([0.2, 0.33, 0.7, 0.9, 1.88])
      num_samples = 10000
      paths = self.evaluate(
          process.sample_paths(
              times,
              num_samples=num_samples,
              initial_state=np.array(0.1),
              seed=1234,
          )
      )
      self.assertArrayEqual(paths.shape, (num_samples, 5, 1))
      self.assertArrayNear(
          np.mean(paths, axis=0).reshape([-1]), np.zeros(5) + 0.1, 0.05
      )
  
      covars = np.cov(paths.reshape([num_samples, 5]), rowvar=False)
      # Expected covariances are: cov_{ij} = min(t_i, t_j)
      expected = np.minimum(
          times.reshape([-1, 1]), times.reshape([1, -1])
      )
      self.assertArrayNear(
          covars.reshape([-1]), expected.reshape([-1]), 0.05
      )
  
file_path: tf-quant-finance/tf_quant_finance/models/legacy/brownian_motion_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import test_util
  from tf_quant_finance.models.legacy.brownian_motion import BrownianMotion
label_desc: Use image node_id 4 for calling the BrownianMotionTest obj's underlying member method code with example usage: obj.test_path_properties_1d() without return types