Browse code

update 'uniform_sampling_1d' example in the docs

Bas Nijholt authored on 22/11/2018 11:57:43
Showing 1 changed files
... ...
@@ -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):