... | ... |
@@ -27,7 +27,7 @@ def _default_loss_per_interval(interval, scale, function_values): |
27 | 27 |
loss = dx |
28 | 28 |
else: |
29 | 29 |
dy = (y_right - y_left) / y_scale |
30 |
- if hasattr(dy, '__len__') and len(y) > 1: |
|
30 |
+ if hasattr(dy, '__len__') and len(dy) > 1: |
|
31 | 31 |
loss = np.hypot(dx, dy).max() |
32 | 32 |
else: |
33 | 33 |
loss = math.hypot(dx, dy) |