#NEWLINE# def integrate( self ) : #NEWLINE# #INDENT# 'Integrates the equations ``evaluate_ode_function()`` using\n        ``ode_solver``.\n\n        It is necessary to have first generated an ode function. If you have\n        not done so, we do so automatically by invoking\n        ``generate_ode_function()``. However, if you want to customize how this\n        function is generated (e.g., change the generator to cython), you can\n        call ``generate_ode_function()`` on your own (before calling\n        ``integrate()``).\n\n        Returns\n        -------\n        x_history : np.array, shape(num_integrator_time_steps, 2)\n            The trajectory of states (coordinates and speeds) through the\n            requested time interval. num_integrator_time_steps is either\n            len(times) if len(times) > 2, or is determined by the\n            ``ode_solver``.\n\n        ' #NEWLINE# self . _check_constants ( self . constants ) #NEWLINE# self . _check_specifieds ( self . specifieds ) #NEWLINE# self . _check_initial_conditions ( self . initial_conditions ) #NEWLINE# self . _check_times ( self . times ) #NEWLINE# if ( self . evaluate_ode_function is None ) : #NEWLINE# #INDENT# self . generate_ode_function ( ) #NEWLINE# #UNINDENT# init_conds_dict = self . _initial_conditions_padded_with_defaults ( ) #NEWLINE# initial_conditions_in_proper_order = [ init_conds_dict [ k ] for k in self . states ] #NEWLINE# if self . _specifieds_are_in_format_2 ( self . specifieds ) : #NEWLINE# #INDENT# specified_value = self . specifieds [ 'values' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# specified_value = self . _specifieds_padded_with_defaults ( ) #NEWLINE# #UNINDENT# if ( isinstance ( specified_value , dict ) and ( not specified_value ) ) : #NEWLINE# #INDENT# args = ( self . _constants_padded_with_defaults ( ) , ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# args = ( specified_value , self . _constants_padded_with_defaults ( ) ) #NEWLINE# #UNINDENT# x_history = self . ode_solver ( self . evaluate_ode_function , initial_conditions_in_proper_order , self . times , args = args ) #NEWLINE# return x_history