def age_correction(month_nums_array,
ages_array,
retage):
'''Long_Form
Returns a long_form (all months) array of employee ages by
incrementing starting ages according to month number.
Note: Retirement age increases are handled by the build_program_files
script by incrementing retirement dates and by the clip_ret_ages
function within the make_skeleton script.
inputs
month_nums_array (array)
gen_month_skeleton function output (ndarray)
ages_array (array)
starting_age function output aligned with long_form (ndarray)
i.e. s_age is starting age (aligned to empkeys)
repeated each month.
retage (integer or float)
output clip upper limit for retirement age
Output is s_age incremented by a decimal month value according to month_num
(this is candidate for np.put refactored function)
'''
month_val = 1 / 12
result_array = (month_nums_array * month_val) + ages_array
result_array = np.clip(result_array, 0, retage)
return result_array
# FIND CONTRACT PAY YEAR AND RAISE (contract pay year
# and optional raise multiplier)
评论列表
文章目录