(X, r=1, k=2)
return result
It implements the following formula:

        .. math::
            \\varphi(\\boldsymbol{x}) =
            \\left(\\frac{\\boldsymbol{x}}{r}\\right)^k
            \\ln\\frac{\\boldsymbol{x}}{r}

         With k=2 the function is "radius free", that means independent of radius value.

        :param numpy.ndarray X: the norm x in the formula above.
        :param float r: the parameter r in the formula above. 
        :param float k: the parameter k in the formula above.
         
        :return: result: the result of the formula above.
        :rtype: float
It implements the following formula:
It implements the following formula :
def thin_plate_spline(X, r=1, k=2):
        """
        It implements the following formula:

        .. math::
            \\varphi(\\boldsymbol{x}) =
            \\left(\\frac{\\boldsymbol{x}}{r}\\right)^k
            \\ln\\frac{\\boldsymbol{x}}{r}

         With k=2 the function is "radius free", that means independent of radius value.

        :param numpy.ndarray X: the norm x in the formula above.
        :param float r: the parameter r in the formula above. 
        :param float k: the parameter k in the formula above.
         
        :return: result: the result of the formula above.
        :rtype: float      
        """
        arg = X / r
        result = np.power(arg, k)
        result = np.where(arg > 0, result * np.log(arg), result)
        return result
def thin_plate_spline ( X , r = 1 , k = 2 ) : arg = X / r result = np . power ( arg , k ) result = np . where ( arg > 0 , result * np . log ( arg ) , result ) return result