Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/539#discussion_r27307815
  
    --- Diff: 
flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/math/DenseVector.scala
 ---
    @@ -67,7 +63,25 @@ case class DenseVector(val values: Array[Double]) 
extends Vector {
        * @return Copy of the vector instance
        */
       override def copy: Vector = {
    -    DenseVector(values.clone())
    +    DenseVector(data.clone())
    +  }
    +
    +  /** Updates the element at the given index with the provided value
    +    *
    +    * @param index
    +    * @param value
    +    */
    +  override def update(index: Int, value: Double): Unit = {
    +    require(0 <= index && index < data.length, s"Index $index is out of 
bounds " +
    --- End diff --
    
    Might be inefficient.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to