spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkbradley <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4562] [MLlib] speedup vector
Date Mon, 24 Nov 2014 01:21:04 GMT
Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3420#discussion_r20770274
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/api/python/PythonMLLibAPI.scala
---
    @@ -749,7 +759,13 @@ private[spark] object SerDe extends Serializable {
           if (args.length != 1) {
             throw new PickleException("should be 1")
           }
    -      new DenseVector(args(0).asInstanceOf[Array[Double]])
    +      val bytes = args(0).asInstanceOf[String].getBytes("ISO-8859-1")
    +      val bb = ByteBuffer.wrap(bytes, 0, bytes.length)
    +      bb.order(ByteOrder.nativeOrder())
    +      val db = bb.asDoubleBuffer()
    +      val ans = new Array[Double](bytes.length/8)
    --- End diff --
    
    spacing around "/"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message