Testing convergence¶
- pytools.convergence.estimate_order_of_convergence(abscissae, errors)[source]¶
Assuming that abscissae and errors are connected by a law of the form
\[\text{Error} = \text{constant} \cdot \text{abscissa }^{\text{order}},\]this function finds, in a least-squares sense, the best approximation of constant and order for the given data set. It returns a tuple (constant, order).
- class pytools.convergence.EOCRecorder[source]¶
- pytools.convergence.stringify_eocs(*eocs: EOCRecorder, names: tuple[str, ...] | None = None, abscissa_label: str = 'h', error_label: str = 'Error', gliding_mean: int = 2, abscissa_format: str = '%s', error_format: str = '%s', eoc_format: str = '%s', table_type: str = 'markdown') str [source]¶
- Parameters:
names – a
tuple
of names to use for the error_label of each eoc.