From a2d9a99f0733ef00e4493c7e2987f8fb1fd81f6e Mon Sep 17 00:00:00 2001 From: mathleur Date: Thu, 19 Sep 2024 15:48:53 +0100 Subject: [PATCH] throw error when the unsliceable axis tries to slice a shape with more values --- polytope/shapes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polytope/shapes.py b/polytope/shapes.py index c3a45a6a7..70ad66b33 100644 --- a/polytope/shapes.py +++ b/polytope/shapes.py @@ -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