(self, points=None, indices=None)
return weights, simplices
Return the linear gradient weights associated with points.

        Parameters
        ----------
        points : ndarray
            Each row represents one point.
        indices : ndarray
            Each row represents one index. Ignored if points

        Returns
        -------
        weights : ndarray
            An array that contains the linear weights for each point.
        simplices : ndarray
            The indices of the simplices associated with each points
Return the linear gradient weights associated with points.
Return the linear gradient weights associated with points .
def _get_weights_gradient(self, points=None, indices=None):
        """Return the linear gradient weights associated with points.

        Parameters
        ----------
        points : ndarray
            Each row represents one point.
        indices : ndarray
            Each row represents one index. Ignored if points

        Returns
        -------
        weights : ndarray
            An array that contains the linear weights for each point.
        simplices : ndarray
            The indices of the simplices associated with each points

        """
        if points is None:
            simplex_ids = np.atleast_1d(indices)
        elif indices is None:
            simplex_ids = self.find_simplex(points)
        else:
            raise TypeError('Need to provide at least one input argument.')
        simplices = self.simplices(simplex_ids)

        # Get hyperplane equations
        simplex_ids %= self.triangulation.nsimplex

        # Some numbers for convenience
        nsimp = self.input_dim + 1
        npoints = len(simplex_ids)

        # weights
        weights = np.empty((npoints, self.input_dim, nsimp),
                           dtype=config.np_dtype)

        weights[:, :, 1:] = self.hyperplanes[simplex_ids]
        weights[:, :, 0] = -np.sum(weights[:, :, 1:], axis=2)
        return weights, simplices
def _get_weights_gradient ( self , points = None , indices = None ) : if points is None : simplex_ids = np . atleast_1d ( indices ) elif indices is None : simplex_ids = self . find_simplex ( points ) else : raise TypeError ( 'Need to provide at least one input argument.' ) simplices = self . simplices ( simplex_ids ) # Get hyperplane equations simplex_ids %= self . triangulation . nsimplex # Some numbers for convenience nsimp = self . input_dim + 1 npoints = len ( simplex_ids ) # weights weights = np . empty ( ( npoints , self . input_dim , nsimp ) , dtype = config . np_dtype ) weights [ : , : , 1 : ] = self . hyperplanes [ simplex_ids ] weights [ : , : , 0 ] = - np . sum ( weights [ : , : , 1 : ] , axis = 2 ) return weights , simplices