Commit e354cd14 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

test re-rolling RGSpace

parent 30a97cc9
Pipeline #18296 passed with stage
in 5 minutes and 51 seconds
......@@ -86,8 +86,8 @@ class RGSpace(Space):
self._harmonic = bool(harmonic)
self._shape = self._parse_shape(shape)
self._distances = self._parse_distances(distances)
self._wgt = reduce(lambda x, y: x*y, self._distances)
self._dim = int(reduce(lambda x, y: x*y, self._shape))
#self._wgt = reduce(lambda x, y: x*y, self._distances)
#self._dim = int(reduce(lambda x, y: x*y, self._shape))
def __repr__(self):
return ("RGSpace(shape=%r, distances=%r, harmonic=%r)"
......@@ -103,11 +103,13 @@ class RGSpace(Space):
@property
def dim(self):
return self._dim
return int(reduce(lambda x, y: x*y, self.shape))
#return self._dim
@property
def total_volume(self):
return self.dim * self._wgt
return self.dim * reduce(lambda x, y: x*y, self.distances)
#return self.dim * self._wgt
def copy(self):
return self.__class__(shape=self.shape,
......@@ -115,10 +117,12 @@ class RGSpace(Space):
harmonic=self.harmonic)
def scalar_weight(self):
return self._wgt
return reduce(lambda x, y: x*y, self.distances)
#return self._wgt
def weight(self):
return self._wgt
return reduce(lambda x, y: x*y, self.distances)
#return self._wgt
def get_distance_array(self):
""" Calculates an n-dimensional array with its entries being the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment