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

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