From b65a597246180621faab11bd0e50dc1f3b2656cd Mon Sep 17 00:00:00 2001 From: Jose Alvarez Date: Fri, 30 Nov 2018 15:39:58 -0500 Subject: [PATCH] vector.array does not work with sparse vectors. vector.toArray() works with both vector types --- elephas/mllib/adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elephas/mllib/adapter.py b/elephas/mllib/adapter.py index 20ee22b..9814faf 100644 --- a/elephas/mllib/adapter.py +++ b/elephas/mllib/adapter.py @@ -23,7 +23,7 @@ def to_matrix(np_array): def from_vector(vector): """Convert MLlib Vector to numpy array """ - return vector.array + return vector.toArray() def to_vector(np_array):