diff --git a/nifty/spaces/gl_space/gl_space.py b/nifty/spaces/gl_space/gl_space.py index 365b59d72237163439b0f8ae3908231ba2494e10..148b947d76038a084958ac21242dbc5b1cb8c1c5 100644 --- a/nifty/spaces/gl_space/gl_space.py +++ b/nifty/spaces/gl_space/gl_space.py @@ -109,9 +109,6 @@ class GLSpace(Space): def total_volume(self): return 4 * np.pi - def copy(self): - return self.__class__(nlat=self.nlat, nlon=self.nlon) - def scalar_weight(self): return None diff --git a/nifty/spaces/hp_space/hp_space.py b/nifty/spaces/hp_space/hp_space.py index 5e9faf8b058f7e857af480e719a6767625fa69c5..7fe9f1f6a18894faaa4f449acf5f1a06372b9526 100644 --- a/nifty/spaces/hp_space/hp_space.py +++ b/nifty/spaces/hp_space/hp_space.py @@ -104,9 +104,6 @@ class HPSpace(Space): def total_volume(self): return 4 * np.pi - def copy(self): - return self.__class__(nside=self.nside) - def scalar_weight(self): return np.pi / (3*self._nside*self._nside) diff --git a/nifty/spaces/lm_space/lm_space.py b/nifty/spaces/lm_space/lm_space.py index e45455a289756822c821f768f5f478521edb476f..73e1224decba9b3754f6fd0e498d1fdcf36f5a40 100644 --- a/nifty/spaces/lm_space/lm_space.py +++ b/nifty/spaces/lm_space/lm_space.py @@ -114,9 +114,6 @@ class LMSpace(Space): # the individual pixels have a fixed volume of 1. return np.float64(self.dim) - def copy(self): - return self.__class__(lmax=self.lmax) - def scalar_weight(self): return 1. diff --git a/nifty/spaces/power_space/power_space.py b/nifty/spaces/power_space/power_space.py index f0512a57980e64a0e7095e6be2e4fff89e9f997d..93a9f05fae8babb77326dcc55fb31ccabc4f0c94 100644 --- a/nifty/spaces/power_space/power_space.py +++ b/nifty/spaces/power_space/power_space.py @@ -204,10 +204,6 @@ class PowerSpace(Space): # every power-pixel has a volume of 1 return float(reduce(lambda x, y: x*y, self.pindex.shape)) - def copy(self): - return self.__class__(harmonic_partner=self.harmonic_partner, - binbounds=self._binbounds) - def scalar_weight(self): return None diff --git a/nifty/spaces/rg_space/rg_space.py b/nifty/spaces/rg_space/rg_space.py index ea52cb6b190c8fc7047dd75d67ed36234d05d220..d8921aac696bf95c84fb769b2c02cbbf9eaa04ca 100644 --- a/nifty/spaces/rg_space/rg_space.py +++ b/nifty/spaces/rg_space/rg_space.py @@ -110,11 +110,6 @@ class RGSpace(Space): def total_volume(self): return self.dim * self._wgt - def copy(self): - return self.__class__(shape=self.shape, - distances=self.distances, - harmonic=self.harmonic) - def scalar_weight(self): return self._wgt diff --git a/nifty/spaces/space/space.py b/nifty/spaces/space/space.py index 8f5a68361c76b6393f85de7d1bf3d3b00ec672d1..95ee4670b44f8f9b8f35c96476fb1fe0dc1f667e 100644 --- a/nifty/spaces/space/space.py +++ b/nifty/spaces/space/space.py @@ -77,17 +77,6 @@ class Space(DomainObject): raise NotImplementedError( "There is no generic volume for the Space base class.") - @abc.abstractmethod - def copy(self): - """ Returns a copy of this Space instance. - - Returns - ------- - Space - A copy of this instance. - """ - return self.__class__() - def get_k_length_array(self): """ The length of the k vector for every pixel. This method is only implemented for harmonic spaces. diff --git a/test/test_spaces/test_interface.py b/test/test_spaces/test_interface.py index 349c7eb79de1f941d75bf2dbe8f8a2f588953a4e..1b04749f7cfa57d657a20e9aee7830540b15b4ed 100644 --- a/test/test_spaces/test_interface.py +++ b/test/test_spaces/test_interface.py @@ -46,13 +46,6 @@ class SpaceInterfaceTests(unittest.TestCase): *method_expected_type[1:-1])) is method_expected_type[-1]) - @expand([[space] for space in generate_spaces()]) - def test_copy(self, space): - # make sure it's a deep copy - assert_(space is not space.copy()) - # make sure contents are the same - assert_equal(space, space.copy()) - @expand([[space] for space in generate_spaces()]) def test_repr(self, space): assert_(space == eval(space.__repr__()))