replace all refs of get_neighbor to get_weight_and_attr

This commit is contained in:
Andy Eschbacher
2018-03-07 15:19:13 -05:00
parent e3aa99dae3
commit aa9d05f614
4 changed files with 8 additions and 8 deletions

View File

@@ -36,7 +36,7 @@ class Moran(object):
("subquery", subquery),
("num_ngbrs", num_ngbrs)])
result = self.data_provider.get_neighbor(w_type, params)
result = self.data_provider.get_weight_and_attrs(w_type, params)
# collect attributes
attr_vals = pu.get_attributes(result)
@@ -93,7 +93,7 @@ class Moran(object):
("subquery", subquery),
("num_ngbrs", num_ngbrs)])
result = self.data_provider.get_neighbor(w_type, params)
result = self.data_provider.get_weight_and_attrs(w_type, params)
# collect attributes
numer = pu.get_attributes(result, 1)
@@ -123,7 +123,7 @@ class Moran(object):
("subquery", subquery),
("num_ngbrs", num_ngbrs)])
result = self.data_provider.get_neighbor(w_type, params)
result = self.data_provider.get_weight_and_attrs(w_type, params)
# collect attributes
numer = pu.get_attributes(result, 1)
@@ -154,7 +154,7 @@ class Moran(object):
("subquery", subquery),
("num_ngbrs", num_ngbrs)])
result = self.data_provider.get_neighbor(w_type, params)
result = self.data_provider.get_weight_and_attrs(w_type, params)
# collect attributes
attr1_vals = pu.get_attributes(result, 1)

View File

@@ -34,7 +34,7 @@ class SpatialLag(object):
("subquery", subquery),
("num_ngbrs", num_ngbrs)])
result = self.data_provider.get_neighbor(w_type, params)
result = self.data_provider.get_weight_and_attrs(w_type, params)
attr_vals = pu.get_attributes(result)
weight = pu.get_weight(result, w_type, num_ngbrs)

View File

@@ -17,7 +17,7 @@ class FakeDataProvider(AnalysisDataProvider):
def __init__(self, data):
self.mock_result = data
def get_markov(self, w_type, params):
def get_weight_and_attrs(self, w_type, params):
return self.mock_result

View File

@@ -15,8 +15,8 @@ class FakeDataProvider(AnalysisDataProvider):
def __init__(self, mock_data):
self.mock_result = mock_data
def get_neighbor(self, w_type, params): # pylint: disable=unused-argument
"""mock get_neighbor"""
def get_weight_and_attrs(self, w_type, params): # pylint: disable=unused-argument
"""mock get_weight_and_attrs"""
return self.mock_result