Skip to content

Commit

Permalink
rollback changes in mllib
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Apr 19, 2015
1 parent 2e7566d commit d17d634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/pyspark/mllib/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import py4j.protocol
from py4j.protocol import Py4JJavaError
from py4j.java_gateway import JavaObject
from py4j.java_collections import JavaArray, JavaList
from py4j.java_collections import ListConverter, JavaArray, JavaList

from pyspark import RDD, SparkContext
from pyspark.serializers import PickleSerializer, AutoBatchedSerializer
Expand Down Expand Up @@ -76,7 +76,7 @@ def _py2java(sc, obj):
elif isinstance(obj, SparkContext):
obj = obj._jsc
elif isinstance(obj, list):
obj = [_py2java(sc, x) for x in obj]
obj = ListConverter().convert([_py2java(sc, x) for x in obj], sc._gateway._gateway_client)
elif isinstance(obj, JavaObject):
pass
elif isinstance(obj, (int, long, float, bool, bytes, unicode)):
Expand Down

0 comments on commit d17d634

Please sign in to comment.