miller_ocp.py
def _interpolate_initial_states(self, X0: np.array):
        """
        Interpolate the initial states to match the number of shooting nodes
        """
        print("interpolating initial states to match the number of shooting nodes")
        x = np.linspace(0, self.phase_time, X0.shape[1])
        y = X0
        f = interpolate.interp1d(x, y)
        x_new = np.linspace(0, self.phase_time, np.sum(self.n_shooting) + len(self.n_shooting))
        y_new = f(x_new)  # use interpolation function returned by `interp1d`
        return y_new

        Interpolate the initial states to match the number of shooting nodes
        
Interpolate the initial states to match the number of shooting nodes
Interpolate the initial states to match the number of shooting nodes
def _interpolate_initial_states(self, X0: np.array):
        print("interpolating initial states to match the number of shooting nodes")
        x = np.linspace(0, self.phase_time, X0.shape[1])
        y = X0
        f = interpolate.interp1d(x, y)
        x_new = np.linspace(0, self.phase_time, np.sum(self.n_shooting) + len(self.n_shooting))
        y_new = f(x_new)  
        return y_new
def _interpolate_initial_states ( self , X0 : np . array ) : print ( "interpolating initial states to match the number of shooting nodes" ) x = np . linspace ( 0 , self . phase_time , X0 . shape [ 1 ] ) y = X0 f = interpolate . interp1d ( x , y ) x_new = np . linspace ( 0 , self . phase_time , np . sum ( self . n_shooting ) + len ( self . n_shooting ) ) y_new = f ( x_new ) return y_new
Interpolate the initial states to match the number of shooting nodes
Interpolate the initial states to match the number of shooting nodes
"""
        Interpolate the initial states to match the number of shooting nodes
        """ # use interpolation function returned by `interp1d`
self
X0
np.array