Given amounts (1-D float), codes (1-D int, one per amount), a sorted
int array rate_keys and a parallel float array rate_values, return the amounts
multiplied by their matching rate:
code against rate_keys to find its raterate_keys yields np.nanInput
amounts = [10. 20. 30.]
codes = [2 7 5]
rate_keys = [2 5 9]
rate_values = [1.5 2. 0.5]
Output
[15. nan 60.]