def calc_J(self):
del self.J<EOL>self.J = np.zeros([self.param_vals.size, self.data.size])<EOL>dp = np.zeros_like(self.param_vals)<EOL>f0 = self.model.copy()<EOL>for a in range(self.param_vals.size):<EOL><INDENT>dp *= <NUM_LIT:0><EOL>dp[a] = self.dl[a]<EOL>f1 = self.func(self.param_vals + dp, *self.func_args, **self.func_kwargs)<EOL>grad_func = (f1 - f0) / dp[a]<EOL>self.J[a] = -grad_func<EOL><DEDENT>
Updates self.J, returns nothing