def euler_scheme(traj, diff_func):
steps = traj.steps<EOL>initial_conditions = traj.initial_conditions<EOL>dimension = len(initial_conditions)<EOL>result_array = np.zeros((steps,dimension))<EOL>func_params_dict = traj.func_params.f_to_dict(short_names=True, fast_access=True)<EOL>result_array[<NUM_LIT:0>] = initial_conditions<EOL>for idx in range(<NUM_LIT:1>,steps):<EOL><INDENT>result_array[idx] = diff_func(result_array[idx-<NUM_LIT:1>], **func_params_dict) * traj.dt +result_array[idx-<NUM_LIT:1>]<EOL><DEDENT>traj.f_add_result('<STR_LIT>', data=result_array, comment='<STR_LIT>')<EOL>
Simulation function for Euler integration.

    :param traj:

        Container for parameters and results

    :param diff_func:

        The differential equation we want to integrate