def dpsi2_dtheta(self, dL_dpsi2, Z, mu, S, target):
self._psi_computations(Z, mu, S)<EOL>d_var = <NUM_LIT>*self._psi2 / self.variance<EOL>d_length = -<NUM_LIT>*self._psi2[:, :, :, None] * (self._psi2_Zdist_sq * self._psi2_denom + self._psi2_mudist_sq + S[:, None, None, :] * self.inv_lengthscale2) / (self.inv_lengthscale * self._psi2_denom)<EOL>target[<NUM_LIT:0>] += np.sum(dL_dpsi2 * d_var)<EOL>dpsi2_dlength = d_length * dL_dpsi2[:, :, :, None]<EOL>if not self.ARD:<EOL><INDENT>target[<NUM_LIT:1>] += dpsi2_dlength.sum() <EOL><DEDENT>else:<EOL><INDENT>target[<NUM_LIT:1>:] += dpsi2_dlength.sum(<NUM_LIT:0>).sum(<NUM_LIT:0>).sum(<NUM_LIT:0>)<EOL><DEDENT>
Shape N,num_inducing,num_inducing,Ntheta