ToolPythonIntermediate solve_ivp from the ground up: the pendulum beyond small angles print("periods:", np.round(np.diff(crossings), 6))T_num = np.diff(crossings).mean()return np.diff(s.t_events[0]).mean()