[mlpack-git] master: Fix #522, for real this time, by using std::. (c751e61)
gitdub at mlpack.org
gitdub at mlpack.org
Tue Feb 16 22:18:21 EST 2016
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/9c1bcf6d8a88d8b3e4271d96859bc843f244255c...c751e61c8e37360c93b664597c189fb984f32de2
>---------------------------------------------------------------
commit c751e61c8e37360c93b664597c189fb984f32de2
Author: Ryan Curtin <ryan at ratml.org>
Date: Tue Feb 16 22:18:21 2016 -0500
Fix #522, for real this time, by using std::.
>---------------------------------------------------------------
c751e61c8e37360c93b664597c189fb984f32de2
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 585e57a..635133e 100644
--- a/src/mlpack/methods/kmeans/kmeans_impl.hpp
+++ b/src/mlpack/methods/kmeans/kmeans_impl.hpp
@@ -168,7 +168,7 @@ Cluster(const MatType& data,
iteration++;
Log::Info << "KMeans::Cluster(): iteration " << iteration << ", residual "
<< cNorm << ".\n";
- if (isnan(cNorm) || isinf(cNorm))
+ if (std::isnan(cNorm) || std::isinf(cNorm))
cNorm = 1e-4; // Keep iterating.
} while (cNorm > 1e-5 && iteration != maxIterations);
More information about the mlpack-git
mailing list