diff options
Diffstat (limited to 'stsci/sphere/polygon.py')
-rw-r--r-- | stsci/sphere/polygon.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/stsci/sphere/polygon.py b/stsci/sphere/polygon.py index 449bd79..509cece 100644 --- a/stsci/sphere/polygon.py +++ b/stsci/sphere/polygon.py @@ -88,7 +88,7 @@ class _SingleSphericalPolygon(object): else: assert np.array_equal(points[0], points[-1]), 'Polygon is not closed' - self._points = np.asanyarray(points) + self._points = points = np.asanyarray(points) if inside is None: self._inside = self._find_new_inside(points) @@ -515,7 +515,7 @@ class _SingleSphericalPolygon(object): return inside # Fallback to the mean - return np.sum(points[:-1]) / (len(points) - 1) + return np.sum(points[:-1], axis=0) / (len(points) - 1) def intersection(self, other): """ @@ -691,7 +691,7 @@ class SphericalPolygon(object): Iterate over the inside point of each of the polygons. """ for polygon in self.iter_polygons_flat(): - yield polygon.points + yield polygon.inside @property def polygons(self): |