Skip to content

Commit

Permalink
throw error when the unsliceable axis tries to slice a shape with mor…
Browse files Browse the repository at this point in the history
…e values
  • Loading branch information
mathleur committed Sep 19, 2024
1 parent 103d50d commit a2d9a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polytope/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ConvexPolytope(Shape):
def __init__(self, axes, points, method=None, is_orthogonal=False):
self._axes = list(axes)
self.is_flat = False
if len(self._axes) == 1:
if len(self._axes) == 1 and len(points) == 1:
self.is_flat = True
self.points = points
self.method = method
Expand Down

0 comments on commit a2d9a99

Please sign in to comment.