flatten results

This commit is contained in:
Taylor Oshan 2016-11-29 11:49:19 -07:00
parent e6a9397373
commit f4ccfe712b

View File

@ -69,9 +69,9 @@ def gwr(subquery, dep_var, ind_vars,
coefficients = [] coefficients = []
stand_errs = [] stand_errs = []
t_vals = [] t_vals = []
predicted = model.predy predicted = model.predy.flatten()
residuals = model.resid_response residuals = model.resid_response
r_squared = model.localR2 r_squared = model.localR2.flatten()
for idx in xrange(n): for idx in xrange(n):
coefficients.append(json.dumps({var: model.params[idx, k] coefficients.append(json.dumps({var: model.params[idx, k]