def update_function(self, param_vals):
dp = np.zeros(self.p0.size)<EOL>for a in range(param_vals.size):<EOL><INDENT>dp += param_vals[a] * self.directions[a]<EOL><DEDENT>self.state.update(self.state.params, self.p0 + dp)<EOL>self.param_vals[:] = param_vals<EOL>return None<EOL>
Updates with param_vals[i] = distance from self.p0 along self.direction[i].