From ef475adc26a51642af64496e60a19c343781da1c Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Fri, 1 Apr 2016 08:23:10 -0400 Subject: [PATCH] testing array outputs --- src/py/crankshaft/crankshaft/space_time_dynamics/markov.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/py/crankshaft/crankshaft/space_time_dynamics/markov.py b/src/py/crankshaft/crankshaft/space_time_dynamics/markov.py index e42176e..1600583 100644 --- a/src/py/crankshaft/crankshaft/space_time_dynamics/markov.py +++ b/src/py/crankshaft/crankshaft/space_time_dynamics/markov.py @@ -62,6 +62,11 @@ def spatial_markov_trend(subquery, time_cols, num_time_per_bin, ## rebin t_data = rebin_data(t_data, int(num_time_per_bin)) + print 'shape of t_data %d, %d' % t_data.shape + print 'number of weight objects: %d, %d' % (weights.sparse).shape + print 'first num elements: %f' % t_data[0, 0] + # ls = ps.lag_spatial(weights, t_data) + sp_markov_result = ps.Spatial_Markov(t_data, weights, k=7, @@ -88,7 +93,7 @@ def get_time_data(markov_data, time_cols): """ num_attrs = len(time_cols) return np.array([[x['attr' + str(i)] for x in markov_data] - for i in range(1, num_attrs+1)], dtype=float).T + for i in range(1, num_attrs+1)], dtype=float).transpose() def rebin_data(time_data, num_time_per_bin): """