Commit ecd57ab2 authored by theos's avatar theos

changed naming of distance_array to get_distance_array

parent 10201132
......@@ -153,16 +153,13 @@ class GLSpace(Space):
return result_x
def distance_array(self, distribution_strategy):
dists = arange(
start=0, stop=self.shape[0],
distribution_strategy=distribution_strategy
)
def get_distance_array(self, distribution_strategy):
dists = arange(start=0, stop=self.shape[0],
distribution_strategy=distribution_strategy)
dists = dists.apply_scalar_function(
lambda x: self._distance_array_helper(divmod(x, self.nlon)),
dtype=np.float
)
dtype=np.float)
return dists
......
......@@ -159,7 +159,7 @@ class HPSpace(Space):
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
......
......@@ -45,7 +45,7 @@ class PowerIndices(object):
self.distribution_strategy = distribution_strategy
# 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
self.global_dict = {}
# Set self.default_parameters
......
......@@ -105,10 +105,10 @@ class PowerSpace(Space):
return result_x
def distance_array(self, distribution_strategy):
def get_distance_array(self, distribution_strategy):
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):
raise NotImplementedError(about._errors.cstring(
......
......@@ -226,7 +226,7 @@ class RGSpace(Space):
result_x = x*weight
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
lengths of the k-vectors from the zero point of the grid.
......
......@@ -272,9 +272,10 @@ class Space(object):
"""
raise NotImplementedError
def distance_array(self, distribution_strategy):
def get_distance_array(self, distribution_strategy):
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):
raise NotImplementedError(about._errors.cstring(
......
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