def check_dQxy_dbeta(self):
def func_Qxy(beta, expcm, x, y):<EOL><INDENT>expcm.updateParams({'<STR_LIT>':beta[<NUM_LIT:0>]})<EOL>return expcm.Qxy[x][y]<EOL><DEDENT>def func_dQxy(beta, expcm, x, y):<EOL><INDENT>expcm.updateParams({'<STR_LIT>':beta[<NUM_LIT:0>]})<EOL>return expcm.dQxy_dbeta[x][y]<EOL><DEDENT>for x in random.sample(range(N_CODON), <NUM_LIT:3>):<EOL><INDENT>for y in range(N_CODON):<EOL><INDENT>diff = scipy.optimize.check_grad(func_Qxy, func_dQxy,<EOL>[self.expcm.beta], self.expcm, x, y, epsilon=<NUM_LIT>)<EOL>self.assertTrue(diff < <NUM_LIT>,<EOL>"<STR_LIT>".format(<EOL>diff, x, y))<EOL><DEDENT><DEDENT>self.expcm.updateParams(self.params)<EOL>
Checks derivatives of `Qxy` with respect to `beta`.