... | ... |
@@ -60,11 +60,8 @@ simple (but naive) strategy is to *uniformly* sample the domain: |
60 | 60 |
|
61 | 61 |
.. jupyter-execute:: |
62 | 62 |
|
63 |
- def uniform_sampling_1d(interval, scale, data): |
|
64 |
- # Note that we never use 'data'; the loss is just the size of the subdomain |
|
65 |
- x_left, x_right = interval |
|
66 |
- x_scale, _ = scale |
|
67 |
- dx = (x_right - x_left) / x_scale |
|
63 |
+ def uniform_sampling_1d(xs, ys): |
|
64 |
+ dx = xs[1] - xs[0] |
|
68 | 65 |
return dx |
69 | 66 |
|
70 | 67 |
def f_divergent_1d(x): |