|
1 | 1 | # -*- coding: utf-8 -*- |
2 | 2 | # Based on an adaptive quadrature algorithm by Pedro Gonnet |
3 | 3 |
|
| 4 | +import sys |
4 | 5 | from collections import defaultdict |
5 | 6 | from math import sqrt |
6 | 7 | from operator import attrgetter |
7 | | -import sys |
8 | 8 |
|
9 | 9 | import numpy as np |
10 | 10 | from scipy.linalg import norm |
|
14 | 14 | from adaptive.notebook_integration import ensure_holoviews |
15 | 15 | from adaptive.utils import cache_latest, restore |
16 | 16 |
|
17 | | -from .integrator_coeffs import (b_def, T_left, T_right, ns, hint, |
18 | | - ndiv_max, min_sep, eps, xi, V_inv, |
19 | | - Vcond, alpha, gamma) |
| 17 | +from .integrator_coeffs import (T_left, T_right, V_inv, Vcond, alpha, b_def, |
| 18 | + eps, gamma, hint, min_sep, ndiv_max, ns, xi) |
20 | 19 |
|
21 | 20 |
|
22 | 21 | def _downdate(c, nans, depth): |
@@ -298,10 +297,10 @@ def complete_process(self, depth): |
298 | 297 |
|
299 | 298 | def __repr__(self): |
300 | 299 | lst = [ |
301 | | - '(a, b)=({:.5f}, {:.5f})'.format(self.a, self.b), |
302 | | - 'depth={}'.format(self.depth), |
303 | | - 'rdepth={}'.format(self.rdepth), |
304 | | - 'err={:.5E}'.format(self.err), |
| 300 | + f'(a, b)=({self.a:.5f}, {self.b:.5f})', |
| 301 | + f'depth={self.depth}', |
| 302 | + f'rdepth={self.rdepth}', |
| 303 | + f'err={self.err:.5E}', |
305 | 304 | 'igral={:.5E}'.format(self.igral if hasattr(self, 'igral') else np.inf), |
306 | 305 | ] |
307 | 306 | return ' '.join(lst) |
|
0 commit comments