def interpolate(self, x, data, mask=None, weights=None, method='<STR_LIT>', n_jobs=-<NUM_LIT:1>):
n = self.vertex_count<EOL>if isinstance(x, Mesh): x = x.coordinates<EOL>interps = pimms.lazy_map(<EOL>{'<STR_LIT>':  lambda:self.interpolation_matrix(x,<EOL>n_jobs=n_jobs, method='<STR_LIT>',<EOL>mask=mask, weights=weights),<EOL>'<STR_LIT>': lambda:self.interpolation_matrix(x,<EOL>n_jobs=n_jobs, method='<STR_LIT>',<EOL>mask=mask, weights=weights),<EOL>'<STR_LIT>':   lambda:self.interpolation_matrix(x,<EOL>n_jobs=n_jobs, method='<STR_LIT>',<EOL>mask=mask, weights=weights)})<EOL>if pimms.is_str(method): method = method.lower()<EOL>if method in [None, Ellipsis, '<STR_LIT>', '<STR_LIT>']: method = None<EOL>elif method in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']: method = '<STR_LIT>'<EOL>elif method in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:h>']: method = '<STR_LIT>'<EOL>elif method in ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>']:<EOL><INDENT>method = '<STR_LIT>'<EOL><DEDENT>else: raise ValueError('<STR_LIT>' % method)<EOL>def _apply_interp(dat):<EOL><INDENT>if pimms.is_str(dat):<EOL><INDENT>return _apply_interp(self.properties[dat])<EOL><DEDENT>elif pimms.is_array(dat, np.inexact, (<NUM_LIT:1>,<NUM_LIT:2>)) and method in [None,'<STR_LIT>']:<EOL><INDENT>return self.apply_interpolation(interps['<STR_LIT>'], dat)<EOL><DEDENT>elif pimms.is_array(dat, '<STR_LIT:int>', (<NUM_LIT:1>,<NUM_LIT:2>)) and method == '<STR_LIT>':<EOL><INDENT>return self.apply_interpolation(interps['<STR_LIT>'], dat)<EOL><DEDENT>elif method in [None, '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>return self.apply_interpolation(interps['<STR_LIT>'], dat)<EOL><DEDENT>else:<EOL><INDENT>return self.apply_interpolation(interps['<STR_LIT>'], dat)<EOL><DEDENT><DEDENT>if pimms.is_str(data) and data.lower() == '<STR_LIT:all>':<EOL><INDENT>data = self.properties<EOL><DEDENT>if pimms.is_lazy_map(data):<EOL><INDENT>return pimms.lazy_map({k:curry(lambda k:_apply_interp(data[k]), k)<EOL>for k in six.iterkeys(data)})<EOL><DEDENT>elif pimms.is_map(data):<EOL><INDENT>return pyr.pmap({k:_apply_interp(data[k]) for k in six.iterkeys(data)})<EOL><DEDENT>elif pimms.is_matrix(data):<EOL><INDENT>if np.shape(data)[<NUM_LIT:1>] != n: data = np.transpose(data)<EOL>if pimms.is_nparray(data): return _apply_interp(data)<EOL>data = [np.asarray(row) for row in data]<EOL>if len(np.unique([row.dtype for row in data])) == <NUM_LIT:1>:<EOL><INDENT>return _apply_interp(np.asarray(data))<EOL><DEDENT>else: return tuple([_apply_interp(row) for row in data])<EOL><DEDENT>elif pimms.is_vector(data, np.number) and len(data) == self.tess.vertex_count:<EOL><INDENT>return _apply_interp(data)<EOL><DEDENT>elif pimms.is_vector(data):<EOL><INDENT>return tuple([_apply_interp(d) for d in data])<EOL><DEDENT>else:<EOL><INDENT>return _apply_interp(data)<EOL><DEDENT>
mesh.interpolate(x, data) yields a numpy array of the data interpolated from the given
  array, data, which must contain the same number of elements as there are points in the
  Mesh object mesh, to the coordinates in the given point matrix x. Note that if x is a
  vector instead of a matrix, then just one value is returned.

The following options are accepted:
  * mask (default: None) indicates that the given True/False or 0/1 valued list/array should
    be used; any point whose nearest neighbor (see below) is in the given mask will, instead
    of an interpolated value, be set to nan. The mask is interpreted by the mask() method.
  * method (default: 'automatic') specifies what method to use for interpolation. The only
    currently supported methods are 'automatic', 'linear', 'heaviest', or 'nearest'. The
    'heaviest' method is like a nearest-neighbor interpolation but rather assigns to
    a destination vertex the value of the source vertex whose voronoi-like polygon contains
    the destination vertex; note that the term 'voronoi-like' is used here because it uses
    the Voronoi diagram that corresponds to the triangle mesh and not the true delaunay
    triangulation. The 'linear' method uses linear interpolation; though if the given data
    is non-numerical, then heaviest interpolation is used instead. The 'automatic' method
    uses linear interpolation for any floating-point data and heaviest interpolation for any
    integral or non-numeric data. Note that heaviest interpolation is used for non-numeric
    data arrays if the method argument is 'linear'.
  * n_jobs (default: -1) is passed along to the cKDTree.query method, so may be set to an
    integer to specify how many processors to use, or may be -1 to specify all processors.