This is the environment implementation of
        :meth:`BaseFont.interpolate`.

        Subclasses may override this method.
169230
def _interpolate(self, factor, minFont, maxFont,
                     round=True, suppressError=True):
        
        # layers
        for layerName in self.layerOrder:
            self.removeLayer(layerName)
        for layerName in minFont.layerOrder:
            if layerName not in maxFont.layerOrder:
                continue
            minLayer = minFont.getLayer(layerName)
            maxLayer = maxFont.getLayer(layerName)
            dstLayer = self.newLayer(layerName)
            dstLayer.interpolate(factor, minLayer, maxLayer,
                                 round=round, suppressError=suppressError)
        if self.layerOrder:
            self.defaultLayer = self.getLayer(self.layerOrder[0])
        # kerning and groups
        self.kerning.interpolate(factor, minFont.kerning, maxFont.kerning,
                                 round=round, suppressError=suppressError)
        # info
        self.info.interpolate(factor, minFont.info, maxFont.info,
                              round=round, suppressError=suppressError)
103743
def _build_interpolation(self):
        
        interpolation = self._interpolation
        self._data_lookup_fn = self._interpolation_fun[interpolation]
        self.shared_program.frag['get_data'] = self._data_lookup_fn

        # only 'bilinear' uses 'linear' texture interpolation
        if interpolation == 'bilinear':
            texture_interpolation = 'linear'
        else:
            # 'nearest' (and also 'bilinear') doesn't use spatial_filters.frag
            # so u_kernel and shape setting is skipped
            texture_interpolation = 'nearest'
            if interpolation != 'nearest':
                self.shared_program['u_kernel'] = self._kerneltex
                self._data_lookup_fn['shape'] = self._data.shape[:2][::-1]

        if self._texture.interpolation != texture_interpolation:
            self._texture.interpolation = texture_interpolation

        self._data_lookup_fn['texture'] = self._texture

        self._need_interpolation_update = False
1202257
def setup_interpolant(self):
        """"""
        # for computing nearby (z < 1) redshifts
        zs = numpy.linspace(0., 1., num=self.numpoints)
        ds = self.cosmology.luminosity_distance(zs).value
        self.nearby_d2z = interpolate.interp1d(ds, zs, kind='linear',
                                                bounds_error=False)
        # for computing far away (z > 1) redshifts
        zs = numpy.logspace(0, numpy.log10(self.default_maxz),
                            num=self.numpoints)
        ds = self.cosmology.luminosity_distance(zs).value
        self.faraway_d2z = interpolate.interp1d(ds, zs, kind='linear',
                                                 bounds_error=False)
        # store the default maximum distance
        self.default_maxdist = ds.max()
166413
def _interpolate(self, xs, ys):
        """"""
        x = []
        y = []
        for i in range(len(ys)):
            if ys[i] is not None:
                x.append(xs[i])
                y.append(ys[i])

        interpolate = INTERPOLATIONS[self.interpolate]

        return list(
            interpolate(
                x, y, self.interpolation_precision,
                **self.interpolation_parameters
            )
        )
481734
def interpolate_where(self, condition):
        
        raise NotImplementedError()
        self[self < 0] = np.nan
        return self.interpolate()
458239
def interpolate(self, times, proj=PlateCarree()) -> np.ndarray:
        
        if proj not in self.interpolator:
            self.interpolator[proj] = interp1d(
                np.stack(t.to_pydatetime().timestamp() for t in self.timestamp),
                proj.transform_points(
                    PlateCarree(), *np.stack(self.coords).T
                ).T,
            )
        return PlateCarree().transform_points(
            proj, *self.interpolator[proj](times)
        )
392505
def to_string_interpolation(node_or_interp)
      unless node_or_interp.is_a?(Interpolation)
        node = node_or_interp
        return string_literal(node.value.to_s) if node.is_a?(Literal)
        if node.is_a?(StringInterpolation)
          return concat(string_literal(node.quote), concat(node, string_literal(node.quote)))
        end
        return StringInterpolation.new(string_literal(""), node, string_literal(""))
      end

      interp = node_or_interp
      after_string_or_interp =
        if interp.after
          to_string_interpolation(interp.after)
        else
          string_literal("")
        end
      if interp.after && interp.whitespace_after
        after_string_or_interp = concat(string_literal(' '), after_string_or_interp)
      end

      mid_string_or_interp = to_string_interpolation(interp.mid)

      before_string_or_interp =
        if interp.before
          to_string_interpolation(interp.before)
        else
          string_literal("")
        end
      if interp.before && interp.whitespace_before
        before_string_or_interp = concat(before_string_or_interp, string_literal(' '))
      end

      concat(before_string_or_interp, concat(mid_string_or_interp, after_string_or_interp))
    end
665784
private static double interpolateBilinear(final double c00, final double c01, final double c10, final double c11, final double mx, final double my){
		return (c00*(1.0-mx)+c10*(mx))*(1.0-my) + (c01*(1.0-mx)+c11*(mx))*(my);
	}
281105
function getInterpolation() {
  const type = NodeType.InterpolationType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  let content = [];

  // Skip `#{`:
  pos += 2;

  while (pos < tokensLength &&
      tokens[pos].type !== TokenType.RightCurlyBracket) {
    const body = getArgument();
    if (typeof body.content === 'string') content.push(body);
    else content = content.concat(body);
  }

  const end = getLastPosition(content, line, column, 1);

  // Skip `}`:
  pos++;

  return newNode(type, content, line, column, end);
}
1226304
def interpolate(p, axis_values, pixelgrid, order=1, mode='constant', cval=0.0):
    
    # convert requested parameter combination into a coordinate
    p_ = np.array([np.searchsorted(av_,val) for av_, val in zip(axis_values,p)])
    lowervals_stepsize = np.array([[av_[p__-1], av_[p__]-av_[p__-1]] \
                         for av_, p__ in zip(axis_values,p_)])
    p_coord = (p-lowervals_stepsize[:,0])/lowervals_stepsize[:,1] + p_-1
    
    # interpolate
    if order > 1:
        prefilter = False
    else:
        prefilter = False

    return [ndimage.map_coordinates(pixelgrid[...,i],p_coord, order=order,
                                    prefilter=prefilter, mode=mode, cval=cval) \
                for i in range(np.shape(pixelgrid)[-1])]
1165150
function interpolate (dyear, data) {
  const d3 = interp.len3ForInterpolateX(dyear,
    data.first, data.last, data.table
  )
  return d3.interpolateX(dyear)
}
249709
def fmt(str, args=None, env=None):
  
  # Normally, we'd just call str.format(**args), but we only want to evaluate
  # values from the tuple which are actually used in the string interpolation,
  # so we use proxy objects.

  # If no args are given, we're able to take the current environment.
  args = args or env
  proxies = {k: StringInterpolationProxy(args, k) for k in args.keys()}
  return str.format(**proxies)
612303
def _make_interpolation(self):
        
        H0_range = np.linspace(10, 100, 90)
        omega_m_range = np.linspace(0.05, 1, 95)
        grid2d = np.dstack(np.meshgrid(H0_range, omega_m_range)).reshape(-1, 2)
        H0_grid = grid2d[:, 0]
        omega_m_grid = grid2d[:, 1]
        Dd_grid = np.zeros_like(H0_grid)
        Ds_Dds_grid = np.zeros_like(H0_grid)
        for i in range(len(H0_grid)):
            Dd, Ds_Dds = self.cosmo2Dd_Ds_Dds(H0_grid[i], omega_m_grid[i])
            Dd_grid[i] = Dd
            Ds_Dds_grid[i] = Ds_Dds
        self._f_H0 = interpolate.interp2d(Dd_grid, Ds_Dds_grid, H0_grid, kind='linear', copy=False, bounds_error=False, fill_value=-1)
        print("H0 interpolation done")
        self._f_omega_m = interpolate.interp2d(Dd_grid, Ds_Dds_grid, omega_m_grid, kind='linear', copy=False, bounds_error=False, fill_value=-1)
        print("omega_m interpolation done")
504725
private List<Float> interpolateBetween(float min, float max, int steps) {

        float delta = (max - min) / (steps + 1);
        List<Float> result = new ArrayList<Float>();
        float num = min;

        for (int i = 0; i < steps; i++) {
            num += delta;
            result.add(new Float(num));
        }
        return result;
    }
1317416
def interpolate_linear(self, lons, lats, data):
        
        return self.interpolate(lons, lats, data, order=1)
1326672
protected void interpolateFlowScale(GrayF32 prev, GrayF32 curr) {
		interp.setImage(prev);

		float scaleX = (float)(prev.width-1)/(float)(curr.width-1)*0.999f;
		float scaleY = (float)(prev.height-1)/(float)(curr.height-1)*0.999f;

		float scale = (float)prev.width/(float)curr.width;

		int indexCurr = 0;
		for( int y = 0; y < curr.height; y++ ) {
			for( int x = 0; x < curr.width; x++ ) {
				curr.data[indexCurr++] = interp.get(x*scaleX,y*scaleY)/scale;
			}
		}
	}
573305
function interpolate(str, args) {
        return str.replace(/\$(\d{1,2})/g, function (match, index) {
            return args[index] || '';
        });
    }