(self, X, Y)
return weights
This private method, given the original control points and the deformed
        ones, returns the matrix with the weights and the polynomial terms, that
        is :math:`W`, :math:`c^T` and :math:`Q^T`. The shape is
        (*n_control_points+1+3*, *3*).

        :param numpy.ndarray X: it is an n_control_points-by-3 array with the
            coordinates of the original interpolation control points before the
            deformation.
        :param numpy.ndarray Y: it is an n_control_points-by-3 array with the
            coordinates of the interpolation control points after the
            deformation.

        :return: weights: the 2D array with the weights and the polynomial terms.
        :rtype: numpy.ndarray
This private method, given the original control points and the deformed
        ones, returns the matrix with the weights and the polynomial terms, that
        is :math:`W`, :math:`c^T` and :math:`Q^T`. The shape is
        (*n_control_points+1+3*, *3*).
This private method given the original control points and the deformed ones returns the matrix with the weights and the polynomial terms that is : math : W : math : c^T and : math : Q^T . The shape is ( * n_control_points + 1 + 3 * * 3 * ) .
def _get_weights(self, X, Y):
        """
        This private method, given the original control points and the deformed
        ones, returns the matrix with the weights and the polynomial terms, that
        is :math:`W`, :math:`c^T` and :math:`Q^T`. The shape is
        (*n_control_points+1+3*, *3*).

        :param numpy.ndarray X: it is an n_control_points-by-3 array with the
            coordinates of the original interpolation control points before the
            deformation.
        :param numpy.ndarray Y: it is an n_control_points-by-3 array with the
            coordinates of the interpolation control points after the
            deformation.

        :return: weights: the 2D array with the weights and the polynomial terms.
        :rtype: numpy.ndarray
        """
        npts, dim = X.shape
        H = np.zeros((npts + 3 + 1, npts + 3 + 1))
        H[:npts, :npts] = self.basis(cdist(X, X), self.radius, **self.extra)
        H[npts, :npts] = 1.0
        H[:npts, npts] = 1.0
        H[:npts, -3:] = X
        H[-3:, :npts] = X.T

        rhs = np.zeros((npts + 3 + 1, dim))
        rhs[:npts, :] = Y
        weights = np.linalg.solve(H, rhs)
        return weights
def _get_weights ( self , X , Y ) : npts , dim = X . shape H = np . zeros ( ( npts + 3 + 1 , npts + 3 + 1 ) ) H [ : npts , : npts ] = self . basis ( cdist ( X , X ) , self . radius , * * self . extra ) H [ npts , : npts ] = 1.0 H [ : npts , npts ] = 1.0 H [ : npts , - 3 : ] = X H [ - 3 : , : npts ] = X . T rhs = np . zeros ( ( npts + 3 + 1 , dim ) ) rhs [ : npts , : ] = Y weights = np . linalg . solve ( H , rhs ) return weights