Commit ecd57ab2 by theos

### changed naming of distance_array to get_distance_array

parent 10201132
 ... @@ -153,16 +153,13 @@ class GLSpace(Space): ... @@ -153,16 +153,13 @@ class GLSpace(Space): return result_x return result_x def distance_array(self, distribution_strategy): def get_distance_array(self, distribution_strategy): dists = arange( dists = arange(start=0, stop=self.shape[0], start=0, stop=self.shape[0], distribution_strategy=distribution_strategy) distribution_strategy=distribution_strategy ) dists = dists.apply_scalar_function( dists = dists.apply_scalar_function( lambda x: self._distance_array_helper(divmod(x, self.nlon)), lambda x: self._distance_array_helper(divmod(x, self.nlon)), dtype=np.float dtype=np.float) ) return dists return dists ... ...
 ... @@ -159,7 +159,7 @@ class HPSpace(Space): ... @@ -159,7 +159,7 @@ class HPSpace(Space): return result_x return result_x def distance_array(self, distribution_strategy): def get_distance_array(self, distribution_strategy): """ """ Calculates distance from center to all the points on the sphere Calculates distance from center to all the points on the sphere ... ...
 ... @@ -45,7 +45,7 @@ class PowerIndices(object): ... @@ -45,7 +45,7 @@ class PowerIndices(object): self.distribution_strategy = distribution_strategy self.distribution_strategy = distribution_strategy # Compute the global k_array # Compute the global k_array self.k_array = self.domain.distance_array(distribution_strategy) self.k_array = self.domain.get_distance_array(distribution_strategy) # Initialize the dictonary which stores all individual index-dicts # Initialize the dictonary which stores all individual index-dicts self.global_dict = {} self.global_dict = {} # Set self.default_parameters # Set self.default_parameters ... ...
 ... @@ -105,10 +105,10 @@ class PowerSpace(Space): ... @@ -105,10 +105,10 @@ class PowerSpace(Space): return result_x return result_x def distance_array(self, distribution_strategy): def get_distance_array(self, distribution_strategy): raise NotImplementedError(about._errors.cstring( raise NotImplementedError(about._errors.cstring( "ERROR: There is no distance_array implementation for PowerSpace.") "ERROR: There is no get_distance_array implementation for " ) "PowerSpace.")) def get_smoothing_kernel_function(self, sigma): def get_smoothing_kernel_function(self, sigma): raise NotImplementedError(about._errors.cstring( raise NotImplementedError(about._errors.cstring( ... ...
 ... @@ -226,7 +226,7 @@ class RGSpace(Space): ... @@ -226,7 +226,7 @@ class RGSpace(Space): result_x = x*weight result_x = x*weight return result_x return result_x def distance_array(self, distribution_strategy): def get_distance_array(self, distribution_strategy): """ """ Calculates an n-dimensional array with its entries being the Calculates an n-dimensional array with its entries being the lengths of the k-vectors from the zero point of the grid. lengths of the k-vectors from the zero point of the grid. ... ...
 ... @@ -272,9 +272,10 @@ class Space(object): ... @@ -272,9 +272,10 @@ class Space(object): """ """ raise NotImplementedError raise NotImplementedError def distance_array(self, distribution_strategy): def get_distance_array(self, distribution_strategy): raise NotImplementedError(about._errors.cstring( raise NotImplementedError(about._errors.cstring( "ERROR: There is no generic distance_array for Space base class.")) "ERROR: There is no generic get_distance_array for " "Space base class.")) def get_smoothing_kernel_function(self, sigma): def get_smoothing_kernel_function(self, sigma): raise NotImplementedError(about._errors.cstring( raise NotImplementedError(about._errors.cstring( ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!