Browse code

2D: scale the multi level learner by the level with the largest ptp distance

Bas Nijholt authored on 22/11/2017 14:15:54
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ from .base_learner import BaseLearner
13 13
 # Learner2D and helper functions.
14 14
 
15 15
 def deviations(ip):
16
-    values = ip.values / (ip.values.ptp() or 1)
16
+    values = ip.values / (ip.values.ptp(axis=0).max() or 1)
17 17
     gradients = interpolate.interpnd.estimate_gradients_2d_global(
18 18
         ip.tri, values, tol=1e-6)
19 19