Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-2278

SparseVector created from Breeze Sparsevector has wrong size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The following code doesn't return true when testing equality of two SparseVectors, one converted from a Breeze SparseVector.

      val flinkVector = SparseVector.fromCOO(3, (1, 1.0), (2, 2.0))
      val breezeVector = linalg.SparseVector(3)(1 -> 1.0, 2 -> 2.0)
      
      flinkVector.equalsVector(breezeVector.fromBreeze)
      

      The reason is that fromBreeze takes the number of non-zero elements SparseVector.used as size when creating a SparseVector instead of the dimensionality SparseVector.length.

      Attachments

        Activity

          People

            trohrmann Till Rohrmann
            ChristophAl Christoph Alt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: