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
All threads resolved!
Compare and Show latest version
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -678,7 +678,7 @@ class LearnerND(BaseLearner):
# If the volume of the two triangles combined is zero then they
# belong to the same plane.
for simplex_key, color in color_dict.items():
points = np.array([hull.points[i] for i in np.unique(simplex_key + simplex)])
points = np.array([hull.points[i] for i in set(simplex_key + simplex)])
if np.linalg.matrix_rank(points[1:] - points[0]) < 3:
return color
if scipy.spatial.ConvexHull(points).volume < 1e-5:
@@ -691,4 +691,4 @@ class LearnerND(BaseLearner):
x, y, z = zip(*self._bounds_points)
i, j, k = hull.simplices.T
return plotly.graph_objs.Mesh3d(x=x, y=y, z=z, i=i, j=j, k=k,
facecolor=(colors), opacity=opacity)
facecolor=colors, opacity=opacity)
Loading