code: def test_NcvContinuous():
      framerate = 100  # Hz
      dt = 1.0 / framerate
      d = 6
      ncv = NcvContinuous(dimension=d, sa2=2.0)
      assert ncv.dimension == d
      assert ncv.dimension_pv == d
      assert ncv.num_process_noise_parameters == 1
  
      x = torch.rand(d)
      y = ncv(x, dt)
      assert_equal(y[0], x[0] + dt * x[d // 2])
  
      dx = ncv.geodesic_difference(x, y)
      assert_not_equal(dx, torch.zeros(d))
  
      x_pv = ncv.mean2pv(x)
      assert len(x_pv) == d
      assert_equal(x, x_pv)
  
      P = torch.eye(d)
      P_pv = ncv.cov2pv(P)
      assert P_pv.shape == (d, d)
      assert_equal(P, P_pv)
  
      Q = ncv.process_noise_cov(dt)
      Q1 = ncv.process_noise_cov(dt)  # Test caching.
      assert_equal(Q, Q1)
      assert Q1.shape == (d, d)
      assert_cov_validity(Q1)
  
      dx = ncv.process_noise_dist(dt).sample()
      assert dx.shape == (ncv.dimension,)
  
file_path: pyro/tests/contrib/tracking/test_dynamic_models.py
imports: import torch
  from pyro.contrib.tracking.dynamic_models import NcpContinuous, NcpDiscrete, NcvContinuous, NcvDiscrete
  from tests.common import assert_equal, assert_not_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_NcvContinuous() without return types