def dKdLen_of_r(self, r, dimCheck, lengthscale):
if (dimCheck == True):<EOL><INDENT>return (self.variance**(float(<NUM_LIT:1>)/self.originalDimensions)) * np.exp(-<NUM_LIT:0.5> * r**<NUM_LIT:2>) * (r**<NUM_LIT:2>) / (lengthscale**(float(<NUM_LIT:1>)/self.originalDimensions))<EOL><DEDENT>else:<EOL><INDENT>return (self.variance**(float(<NUM_LIT:1>)/self.originalDimensions)) * np.exp(-<NUM_LIT:0.5> * r**<NUM_LIT:2>) / (lengthscale**(float(<NUM_LIT:1>)/self.originalDimensions))<EOL><DEDENT>
Compute derivative of kernel for dimension wrt lengthscale
Computation of derivative changes when lengthscale corresponds to
the dimension of the kernel whose derivate is being computed.