We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 025da49 commit b4cb71bCopy full SHA for b4cb71b
examples/sparse/example.pl
@@ -11,7 +11,7 @@
11
12
sub sparsevec {
13
my ($elements, $dim) = @_;
14
- return '{' . join(',', map { $_->{index} . ':' . $_->{value} } @$elements) . '}/' . $dim;
+ return '{' . join(',', map { ($_->{index} + 1) . ':' . $_->{value} } @$elements) . '}/' . $dim;
15
}
16
17
sub embed {
0 commit comments