def sum_experience(agent_stats, skill_headers=None, verbose=False, pop=None):
    'Simply take the sum of XP over skills and agents.'
    agent_skills = get_pop_stats(agent_stats['skills'], pop)
    lifespans = get_pop_stats(agent_stats['lifespans'], pop)
    a_skills = np.vstack(agent_skills)
    a_lifespans = np.hstack(lifespans)
    (n_agents, n_skills) = a_skills.shape
    mean_xp = (a_skills.sum() / (n_agents * n_skills))
    if verbose:
        print('skills')
        print(a_skills.T)
        print('lifespans')
        print(a_lifespans)
        print('mean xp:', mean_xp)
        print()
    return mean_xp
Simply take the sum of XP over skills and agents.
def sum_experience(agent_stats, skill_headers=None, verbose=False, pop=None):
    
    agent_skills = get_pop_stats(agent_stats['skills'], pop)
    lifespans = get_pop_stats(agent_stats['lifespans'], pop)
    a_skills = np.vstack(agent_skills)
    a_lifespans = np.hstack(lifespans)
    (n_agents, n_skills) = a_skills.shape
    mean_xp = (a_skills.sum() / (n_agents * n_skills))
    if verbose:
        print('skills')
        print(a_skills.T)
        print('lifespans')
        print(a_lifespans)
        print('mean xp:', mean_xp)
        print()
    return mean_xp