Conditions | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import numpy as np |
||
23 | def integral(self, a, b, n_points=100, k=1): |
||
24 | |||
25 | # Make a second interpolator |
||
26 | xx = np.logspace(mlog10(a), mlog10(b), n_points) |
||
27 | |||
28 | yy = self.__call__(xx) |
||
29 | |||
30 | int_interp = scipy.interpolate.InterpolatedUnivariateSpline(xx, yy, k=k) |
||
31 | |||
32 | return int_interp.integral(a, b) |
||
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.