replace all refs of get_neighbor to get_weight_and_attr
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user