Skip to content

Commit 081050f

Browse files
committed
Initialize the row sum
1 parent 682f32f commit 081050f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cpp11test/src/matrix.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ using namespace Rcpp;
7272

7373
int i = 0;
7474
for (auto& row : x) {
75+
sums[i] = 0.;
7576
for (auto&& val : row) {
7677
if (cpp11::is_na(val)) {
7778
sums[i] = NA_REAL;

0 commit comments

Comments
 (0)