From 5ac548397de9a71a308ec20dfdd6c449bd033f42 Mon Sep 17 00:00:00 2001 From: Matei Zaharia <matei@eecs.berkeley.edu> Date: Wed, 31 Jul 2013 23:12:30 -0700 Subject: [PATCH] Fix string parsing and style in LR --- python/examples/logistic_regression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/examples/logistic_regression.py b/python/examples/logistic_regression.py index 1e1b6d6e5b..1117dea538 100755 --- a/python/examples/logistic_regression.py +++ b/python/examples/logistic_regression.py @@ -39,7 +39,7 @@ def readPointBatch(iterator): strs = list(iterator) matrix = np.zeros((len(strs), D + 1)) for i in xrange(len(strs)): - matrix[i] = np.fromstring(strs[i], dtype=np.float32, sep = ' ') + matrix[i] = np.fromstring(strs[i].replace(',', ' '), dtype=np.float32, sep=' ') return [matrix] if __name__ == "__main__": -- GitLab