flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Alt (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-2278) SparseVector created from Breeze Sparsevector has wrong size
Date Fri, 26 Jun 2015 10:06:04 GMT

     [ https://issues.apache.org/jira/browse/FLINK-2278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christoph Alt updated FLINK-2278:
---------------------------------
    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*.

  was:
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*.


> SparseVector created from Breeze Sparsevector has wrong size
> ------------------------------------------------------------
>
>                 Key: FLINK-2278
>                 URL: https://issues.apache.org/jira/browse/FLINK-2278
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Christoph Alt
>              Labels: ML
>
> 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*.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message