def _grad_one_param(self, funct, p, dl=<NUM_LIT>, rts=False, nout=<NUM_LIT:1>, **kwargs):
vals = self.get_values(p)<EOL>f0 = funct(**kwargs)<EOL>self.update(p, vals+dl)<EOL>f1 = funct(**kwargs)<EOL>if rts:<EOL><INDENT>self.update(p, vals)<EOL><DEDENT>if nout == <NUM_LIT:1>:<EOL><INDENT>return (f1 - f0) / dl<EOL><DEDENT>else:<EOL><INDENT>return [(f1[i] - f0[i]) / dl for i in range(nout)]<EOL><DEDENT>
Gradient of `func` wrt a single parameter `p`. (see _graddoc)