diff --git a/faiss/Clustering.cpp b/faiss/Clustering.cpp index 0e46b7d5a..546d17782 100644 --- a/faiss/Clustering.cpp +++ b/faiss/Clustering.cpp @@ -289,7 +289,7 @@ void Clustering::train_encoded (idx_t nx, const uint8_t *x_in, // reports. const float *x = reinterpret_cast(x_in); for (size_t i = 0; i < nx * d; i++) { - FAISS_THROW_IF_NOT_MSG (finite (x[i]), + FAISS_THROW_IF_NOT_MSG (std::isfinite (x[i]), "input contains NaN's or Inf's"); } }