summaryrefslogtreecommitdiff
path: root/stsci/sphere/polygon.py
diff options
context:
space:
mode:
authorbsimon <bsimon@stsci.edu>2015-04-09 15:38:55 -0400
committerbsimon <bsimon@stsci.edu>2015-04-09 15:38:55 -0400
commit0a03767000dcb29e998d55c120e21f892e2288c3 (patch)
tree8482dc2de72c0d43ea834caf9b3167a8b49ecd68 /stsci/sphere/polygon.py
parent457db3570a50cf2d88fa5ac00d1ba1d5b119ea7a (diff)
downloadstsci.sphere-0a03767000dcb29e998d55c120e21f892e2288c3.tar.gz
adding some backport changes I missed on the first time around
git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci.sphere/trunk@38912 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 5f708691fc28a7c2846cf110e5fe656cfeda8ee3
Diffstat (limited to 'stsci/sphere/polygon.py')
-rw-r--r--stsci/sphere/polygon.py6
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):