check_probability_distribution_sum_age_distributions#

check_probability_distribution_sum_age_distributions(location, arr, tolerance=0.01, **kwargs)[source]#

Check that each population age distribution has a sum equal to 1 within some tolerance.

Parameters:
  • location (json) – the json object with location data

  • arr (list) – the list of population age distributions

  • tolerance (float) – difference from the sum of 1 tolerated

  • kwargs (dict) – dictionary of values passed to np.isclose()

Returns:

[True, None] if the sum of the probability distribution is equal to 1 within the tolerance level. [False, str] else. The returned str is the error message with some information about the check.