From 31df25ae1622ae39c06e60f7240155d4e22572e7 Mon Sep 17 00:00:00 2001 From: lim Date: Thu, 31 May 2012 21:07:03 +0000 Subject: lim changed SphericalPolygon.__copy__ and added methods to SkyLine git-svn-id: http://svn.stsci.edu/svn/ssb/stsci_python/stsci_python/branches/sphere@17093 fe389314-cf27-0410-b35b-8c050e845b92 Former-commit-id: 4e5e26af63393082e5a9baae4f37704f99cd4227 --- lib/polygon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/polygon.py') diff --git a/lib/polygon.py b/lib/polygon.py index 7e76baa..79f1d64 100644 --- a/lib/polygon.py +++ b/lib/polygon.py @@ -39,7 +39,7 @@ polygons on the unit sphere. from __future__ import division, print_function # STDLIB -from copy import copy +from copy import copy, deepcopy # THIRD-PARTY import numpy as np @@ -89,7 +89,7 @@ class SphericalPolygon(object): # TODO: Detect self-intersection and fix def __copy__(self): - return self.__class__(np.copy(self._points), np.copy(self._inside)) + return deepcopy(self) def __repr__(self): return 'SphericalPolygon(%r, %r)' % (self.points, self.inside) -- cgit