Normalise reward-model scores to zero mean and unit variance: subtract the mean and divide by the population standard deviation. The scores must not all be equal.
Implement solve(rewards).
Returns. Return a float NumPy array. If every score is identical the standard deviation is 0 and the result is not finite (nan).
Example 1
Input:
solve([1.0, 2.0, 3.0])
Output:
[-1.224745, 0.0, 1.224745]
Example 2
Input:
solve([10.0, 20.0, 30.0, 40.0])
Output:
[-1.341641, -0.447214, 0.447214, 1.341641]
No results yet
Run your code to check it against the examples, or submit to run every test.