@Cache_this(limit=<NUM_LIT:3>, ignore_args=())<EOL><INDENT>def _scaled_dist(self, X, X2=None):<DEDENT>
if self.ARD:<EOL><INDENT>if X2 is not None:<EOL><INDENT>X2 = X2 / self.lengthscale<EOL><DEDENT>return self._unscaled_dist(X/self.lengthscale, X2)<EOL><DEDENT>else:<EOL><INDENT>return self._unscaled_dist(X, X2)/self.lengthscale<EOL><DEDENT>
Efficiently compute the scaled distance, r.

..math::
    r = \sqrt( \sum_{q=1}^Q (x_q - x'q)^2/l_q^2 )

Note that if thre is only one lengthscale, l comes outside the sum. In
this case we compute the unscaled distance first (in a separate
function for caching) and divide by lengthscale afterwards