| Conditions | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import numpy as np |
||
| 9 | def __init__(self, x, y, k=2): |
||
| 10 | |||
| 11 | y = y.astype(np.float64) |
||
| 12 | y = np.clip(y, 2 * np.finfo(np.float64).tiny, None) |
||
| 13 | |||
| 14 | logx = log10(x) |
||
| 15 | logy = log10(y) |
||
| 16 | |||
| 17 | self._interp = scipy.interpolate.InterpolatedUnivariateSpline(logx, logy, k=k) |
||
| 18 | |||
| 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.