return nan when quantileExact with empty float column

This commit is contained in:
sundy-li 2018-08-13 16:33:51 +08:00
parent 9d44eebfe6
commit 65670bc33a
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ struct QuantileExact
return array[n];
}
return Value();
return std::numeric_limits<Value>::quiet_NaN();
}
/// Get the `size` values of `levels` quantiles. Write `size` results starting with `result` address.

View File

@ -72,7 +72,7 @@ struct QuantileExactWeighted
size_t size = map.size();
if (0 == size)
return Value();
return std::numeric_limits<Value>::quiet_NaN();
/// Copy the data to a temporary array to get the element you need in order.
using Pair = typename Map::value_type;