We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent faa9764 commit 9f8bed8Copy full SHA for 9f8bed8
mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala
@@ -526,10 +526,8 @@ private[python] class PythonMLLibAPI extends Serializable {
526
527
val documents = data.rdd.map(_.asScala.toArray).map { r =>
528
r(0) match {
529
- case i: java.lang.Integer =>
530
- (r(0).asInstanceOf[java.lang.Integer].toLong, r(1).asInstanceOf[Vector])
531
- case i: java.lang.Long =>
532
- (r(0).asInstanceOf[java.lang.Long].toLong, r(1).asInstanceOf[Vector])
+ case i: java.lang.Integer => (i.toLong, r(1).asInstanceOf[Vector])
+ case i: java.lang.Long => (i.toLong, r(1).asInstanceOf[Vector])
533
case _ => throw new IllegalArgumentException("input values contains invalid type value.")
534
}
535
0 commit comments