def _clean_up_model_ready_matrices(matrices):
    """
    Adjust the 'other locations' matrix such that the sum of the 4 location-specific matrices is equal to the
    all_locations matrix.
    """
    other_locations_matrix = matrices["all_locations"] - (matrices["home"] + matrices["school"] + matrices["work"])
    other_locations_matrix[other_locations_matrix < 0.] = 0
    matrices["other_locations"] = other_locations_matrix
    return matrices