From eed50cc1c92e42923961e4140c5fe3b6681e6add Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Mon, 24 Sep 2018 10:06:23 +1000 Subject: [PATCH] Cast from matrix to avoid warning in nndsvd --- R/seed-nndsvd.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/seed-nndsvd.R b/R/seed-nndsvd.R index 51eebf31..1ff48639 100644 --- a/R/seed-nndsvd.R +++ b/R/seed-nndsvd.R @@ -83,7 +83,7 @@ NULL n_vvp = .norm(vvp) ; n_uun = .norm(uun) ; n_vvn = .norm(vvn) ; - termp = n_uup %*% n_vvp; termn = n_uun %*% n_vvn; + termp = c(n_uup %*% n_vvp); termn = c(n_uun %*% n_vvn); if (termp >= termn){ W[,i] = sqrt(S[i] * termp) * uup / n_uup; H[i,] = sqrt(S[i] * termp) * vvp / n_vvp;