`calculate_variable_percentile_from_value()` throws error when percentile array is all NA
This bug was found when running calculate_multiple_variable_percentiles_from_values()
in an example notebook. One of the sites used in this notebook (01135100) had only one year of data, which led to a percentile df containing only NANs
. When it was fed into calculate_multiple_variable_percentiles_from_values()
and thus calculate_variable_percentile_from_value()
, the latter throws an error because it can't calculate a percentile from NANs
. This was missed in the unit tests! I think we just need to have it return a NAN
if all percentiles are NAN
.