code: def ckf_transform(Xs, Q):
      
  
      m, n = Xs.shape
  
      x = sum(Xs, 0)[:, None] / m
      P = np.zeros((n, n))
      xf = x.flatten()
      for k in range(m):
          P += np.outer(Xs[k], Xs[k]) - np.outer(xf, xf)
  
      P *= 1 / m
      P += Q
  
      return x, P
docs: Compute mean and covariance of array of cubature points.
  
      Parameters
      ----------
  
      Xs : ndarray
          Cubature points
  
      Q : ndarray
          Noise covariance
  
      Returns
      -------
  
      mean : ndarray
           mean of the cubature points
  
      variance: ndarray
           covariance matrix of the cubature points