[SPARK-9408] [PYSPARK] [MLLIB] Refactor linalg.py to /linalg
This is based on MechCoder 's PR https://github.com/apache/spark/pull/7731. Hopefully it could pass tests. MechCoder I tried to make minimal changes. If this passes Jenkins, we can merge this one first and then try to move `__init__.py` to `local.py` in a separate PR. Closes #7731 Author: Xiangrui Meng <meng@databricks.com> Closes #7746 from mengxr/SPARK-9408 and squashes the following commits: 0e05a3b [Xiangrui Meng] merge master 1135551 [Xiangrui Meng] add a comment for str(...) c48cae0 [Xiangrui Meng] update tests 173a805 [Xiangrui Meng] move linalg.py to linalg/__init__.py
This commit is contained in:
parent
1afdeb7b45
commit
ca71cc8c8b
|
@ -323,7 +323,7 @@ pyspark_mllib = Module(
|
|||
"pyspark.mllib.evaluation",
|
||||
"pyspark.mllib.feature",
|
||||
"pyspark.mllib.fpm",
|
||||
"pyspark.mllib.linalg",
|
||||
"pyspark.mllib.linalg.__init__",
|
||||
"pyspark.mllib.random",
|
||||
"pyspark.mllib.recommendation",
|
||||
"pyspark.mllib.regression",
|
||||
|
|
|
@ -648,7 +648,7 @@ class UserDefinedType(DataType):
|
|||
|
||||
@classmethod
|
||||
def fromJson(cls, json):
|
||||
pyUDT = str(json["pyClass"])
|
||||
pyUDT = str(json["pyClass"]) # convert unicode to str
|
||||
split = pyUDT.rfind(".")
|
||||
pyModule = pyUDT[:split]
|
||||
pyClass = pyUDT[split+1:]
|
||||
|
|
Loading…
Reference in a new issue