[mlpack] 249/324: Explicit cast for older versions of Armadillo.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 39c4a4d8d07535314ff8f5b65bf77f972392a971
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Wed Jul 30 18:08:51 2014 +0000

    Explicit cast for older versions of Armadillo.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16928 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/methods/kmeans/kmeans_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mlpack/methods/kmeans/kmeans_impl.hpp b/src/mlpack/methods/kmeans/kmeans_impl.hpp
index 0254e21..4f0d164 100644
--- a/src/mlpack/methods/kmeans/kmeans_impl.hpp
+++ b/src/mlpack/methods/kmeans/kmeans_impl.hpp
@@ -149,7 +149,7 @@ Cluster(const MatType& data,
     centroids.zeros(data.n_rows, actualClusters);
     for (size_t i = 0; i < data.n_cols; ++i)
     {
-      centroids.col(assignments[i]) += data.col(i);
+      centroids.col(assignments[i]) += arma::vec(data.col(i));
       counts[assignments[i]]++;
     }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list