GitHub user tillrohrmann opened a pull request:
https://github.com/apache/flink/pull/636
[FLINK-1937] [ml] Fixes sparse vector/matrix creation fromCOO with a single
element
The problem seems to be that Scala apparently cannot infer the correct type
of a single tuple in the presence of the overloaded method with the
```Iterable``` type parameter. If one provides more than one element, then
Scala knows that only the varargs method is applicable and thus infers that the
tuples have to be of type ```(Int, Double)```.
One can solve this problem by specifying explicitly that the single tuple
is of type ```(Int, Double)```. However, to ensure a nice user experience I
added a special case method which takes a single tuple of type ```(Int, Int)```
and converts it into a ```(Int, Double)``` type.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tillrohrmann/flink fixSparseVector
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/636.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #636
----
commit 2a497a3e42574f5f17e4ec2133b8b7f7ccdd37bb
Author: Till Rohrmann <[email protected]>
Date: 2015-04-28T09:01:07Z
[FLINK-1937] [ml] Fixes sparse vector/matrix creation fromCOO with a single
element
----
---
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.
---