... | ... |
@@ -78,13 +78,14 @@ def uniform_loss(ip): |
78 | 78 |
|
79 | 79 |
Examples |
80 | 80 |
-------- |
81 |
+ >>> from adaptive.learner.learner2D import uniform_loss |
|
81 | 82 |
>>> def f(xy): |
82 | 83 |
... x, y = xy |
83 | 84 |
... return x**2 + y**2 |
84 | 85 |
>>> |
85 | 86 |
>>> learner = adaptive.Learner2D(f, |
86 | 87 |
... bounds=[(-1, -1), (1, 1)], |
87 |
- ... loss_per_triangle=uniform_sampling_2d) |
|
88 |
+ ... loss_per_triangle=uniform_loss) |
|
88 | 89 |
>>> |
89 | 90 |
""" |
90 | 91 |
return np.sqrt(areas(ip)) |