code: def spherical_radial_sigmas(x, P):
      r
  
      n, _ = P.shape
      x = x.flatten()
  
      sigmas = np.empty((2*n, n))
      U = cholesky(P) * sqrt(n)
      for k in range(n):
          sigmas[k] = x + U[k]
          sigmas[n+k] = x - U[k]
  
      return sigmas
docs: r""" Creates cubature points for the the specified state and covariance
      according to [1].
  
      Parameters
      ----------
  
      x: ndarray (column vector)
          examples:  np.array([[1.], [2.]])
  
      P : scalar, or np.array
         Covariance of the filter.
  
      References
      ----------
  
      .. [1] Arasaratnam, I, Haykin, S. "Cubature Kalman Filters,"
         IEEE Transactions on Automatic Control, 2009, pp 1254-1269, vol 54, No 6