Skip to content
Snippets Groups Projects

Resolve "(LearnerND) add iso-surface plot feature"

Merged Jorn Hoofwijk requested to merge 112-learnernd-add-iso-surface-plot-feature into master
Compare and Show latest version
1 file
+ 2
6
Compare changes
  • Side-by-side
  • Inline
@@ -577,11 +577,6 @@ class LearnerND(BaseLearner):
else:
raise ValueError("Only 1 or 2-dimensional plots can be generated.")
def get_range(self):
r_min = min(self.data[v] for v in self.tri.vertices)
r_max = max(self.data[v] for v in self.tri.vertices)
return r_min, r_max
def _get_isosurface(self, level=0.0):
if self.ndim != 3 or self.vdim != 1:
raise Exception('Isosurface plotting is only supported'
@@ -633,7 +628,8 @@ class LearnerND(BaseLearner):
faces.append(plane[1:])
if len(faces) == 0:
r_min, r_max = self.get_range()
r_min = min(self.data[v] for v in self.tri.vertices)
r_max = max(self.data[v] for v in self.tri.vertices)
raise ValueError(
f"Could not draw isosurface for level={level}, as"
Loading