Skip to content

Commit f38d20f

Browse files
jhoofwijkbasnijholt
authored andcommitted
actually compute the dx by subtracting two DIFFERENT numbers
1 parent 9c26669 commit f38d20f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adaptive/learner/learner1D.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def curvature_loss(xs, ys):
132132

133133
triangle_loss_ = triangle_loss(xs, ys)
134134
default_loss_ = default_loss(xs_middle, ys_middle)
135-
dx = xs_middle[0] - xs_middle[0]
135+
dx = xs_middle[1] - xs_middle[0]
136136
return (area_factor * (triangle_loss_**0.5)
137137
+ euclid_factor * default_loss_
138138
+ horizontal_factor * dx)

0 commit comments

Comments
 (0)