From aa9d05f614d1f4d2243400c8fd08098d9b58e870 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 7 Mar 2018 15:19:13 -0500 Subject: [PATCH] replace all refs of get_neighbor to get_weight_and_attr --- src/py/crankshaft/crankshaft/clustering/moran.py | 8 ++++---- src/py/crankshaft/crankshaft/spatial_lag/spatial_lag.py | 2 +- src/py/crankshaft/test/test_space_time_dynamics.py | 2 +- src/py/crankshaft/test/test_spatial_lag.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/py/crankshaft/crankshaft/clustering/moran.py b/src/py/crankshaft/crankshaft/clustering/moran.py index 640f814..d207fd1 100644 --- a/src/py/crankshaft/crankshaft/clustering/moran.py +++ b/src/py/crankshaft/crankshaft/clustering/moran.py @@ -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) diff --git a/src/py/crankshaft/crankshaft/spatial_lag/spatial_lag.py b/src/py/crankshaft/crankshaft/spatial_lag/spatial_lag.py index 03579bb..78abff0 100644 --- a/src/py/crankshaft/crankshaft/spatial_lag/spatial_lag.py +++ b/src/py/crankshaft/crankshaft/spatial_lag/spatial_lag.py @@ -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) diff --git a/src/py/crankshaft/test/test_space_time_dynamics.py b/src/py/crankshaft/test/test_space_time_dynamics.py index d14563e..a37b47c 100644 --- a/src/py/crankshaft/test/test_space_time_dynamics.py +++ b/src/py/crankshaft/test/test_space_time_dynamics.py @@ -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 diff --git a/src/py/crankshaft/test/test_spatial_lag.py b/src/py/crankshaft/test/test_spatial_lag.py index c96576a..0466e44 100644 --- a/src/py/crankshaft/test/test_spatial_lag.py +++ b/src/py/crankshaft/test/test_spatial_lag.py @@ -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