Commit c827ecfb authored by Adam Rogowiec's avatar Adam Rogowiec Committed by Robert Kimball

Use appropriate function to test NAN. (#2332)

parent 9799e2a4
......@@ -440,7 +440,7 @@ void ngraph::check_fp_values_isnan(const char* name, const float* array, size_t
{
for (size_t i = 0; i < n; i++)
{
if (std::isinf(array[i]))
if (std::isnan(array[i]))
{
throw std::runtime_error("Discovered NaN in '" + string(name) + "'");
}
......@@ -451,7 +451,7 @@ void ngraph::check_fp_values_isnan(const char* name, const double* array, size_t
{
for (size_t i = 0; i < n; i++)
{
if (std::isinf(array[i]))
if (std::isnan(array[i]))
{
throw std::runtime_error("Discovered NaN in '" + string(name) + "'");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment