Returns indices of the triangles containing xi yi

        Parameters
        ----------
         xi : float / array of floats, shape (l,)
            Cartesian coordinates in the x direction
         yi : float / array of floats, shape (l,)
            Cartesian coordinates in the y direction

        Returns
        -------
         tri_indices: array of ints, shape (l,)

        Notes
        -----
          The simplices are found as cartesian.Triangulation.simplices[tri_indices]

def containing_triangle(self, xi, yi):
        """
        Returns indices of the triangles containing xi yi

        Parameters
        ----------
         xi : float / array of floats, shape (l,)
            Cartesian coordinates in the x direction
         yi : float / array of floats, shape (l,)
            Cartesian coordinates in the y direction

        Returns
        -------
         tri_indices: array of ints, shape (l,)

        Notes
        -----
          The simplices are found as cartesian.Triangulation.simplices[tri_indices]
        """
        p = self._permutation
        pts = np.column_stack([xi, yi])

        sorted_simplices = np.sort(self._simplices, axis=1)

        triangles = []
        for pt in pts:
            t = _tripack.trfind(3, pt[0], pt[1], self._x, self._y, self.lst, self.lptr, self.lend)
            tri = np.sort(t) - 1

            triangles.extend(np.where(np.all(p[sorted_simplices]==p[tri], axis=1))[0])

        return np.array(triangles).ravel()