I'm running a simulation in which people age in small (month, week) increments. However, I have hazards in non-consistent age-intervals. Is there an simple/efficient way to round my age at any time to the nearest age-group (for the purpose of extracting the hazards for that age?
age_groups = np.array([0, .01, .1, 5, 10, 15, 20, 25, 30, 35, 40])