code: def zoom(
      array,
      zoom,
      out=None,
      order=3,
      mode="constant",
      cval=0.0,
      prefilter=True,
      output=None,
  ):
      """
      Zoom an array.
  
      The array is zoomed using spline interpolation of the requested order.
  
      Parameters
      ----------
      array : ndarray
          The input array.
      zoom : float or sequence, optional
          The zoom factor along the axes. If a float, `zoom` is the same for each
          axis. If a sequence, `zoom` should contain one value for each axis.
      out : ndarray or dtype, optional
          The array in which to place the output, or the dtype of the returned
          array.
      order : int, optional
          The order of the spline interpolation, default is 3.
          The order has to be in the range 0-5.
      mode : str, optional
          Points outside the boundaries of the input are filled according
          to the given mode ('constant', 'nearest', 'reflect' or 'wrap').
          Default is 'constant'.
      cval : scalar, optional
          Value used for points outside the boundaries of the input if
          ``mode='constant'``. Default is 0.0
      prefilter : bool, optional
          The parameter prefilter determines if the input is pre-filtered with
          `spline_filter` before interpolation (necessary for spline
          interpolation of order > 1).  If False, it is assumed that the input is
          already filtered. Default is True.
  
      Returns
      -------
      return_value : ndarray
      """
      array = _maybe_filter(
          array, order, "interpolate.zoom", prefilter, dtype=np.float64
      )
      zoom = np.array(zoom)
      if zoom.ndim == 0:
          zoom = np.array([zoom] * array.ndim)
      elif zoom.ndim != 1:
          raise ValueError(
              "mahotas.interpolation.zoom: zoom should be a 1-d array"
          )
      if len(zoom) != array.ndim:
          raise ValueError(
              "mahotas.interpolation.zoom: zoom should have one element for each dimension of array"
          )
  
      if out is None and output is not None:  # pragma: no cover
          import warnings
  
          warnings.warn(
              "mahotas.interpolate.zoom: Use `out` for output parameter instead of `output`",
              DeprecationWarning,
          )
          out = output
  
      if out is None:
          output_shape = tuple(
              [int(s * z) for s, z in zip(array.shape, zoom)]
          )
          out = np.empty(output_shape, dtype=array.dtype)
      zoom_div = np.array(out.shape, float) - 1
      zoom = (np.array(array.shape) - 1) / zoom_div
      zoom = np.ascontiguousarray(zoom)
  
      # Zooming to infinity is unpredictable, so just choose
      # zoom factor 1 instead
      zoom[np.isinf(zoom)] = 1
  
      _check_mode(mode, cval, "interpolation.zoom")
  
      # zooming is always done in floats, but the user may want the output in
      # another type, so handle this case here:
      o_out = None
      if out.dtype != array.dtype:
          o_out = out
          out = np.empty(out.shape, array.dtype)
      _interpolate.zoom_shift(
          array, zoom, None, out, order, mode2int[mode], cval
      )
      if o_out is not None:
          o_out[:] = out[:]
          out = o_out
      return out
  
file_path: mahotas/mahotas/interpolate.py
imports: import numpy
  from .None import internal
  from .None import _interpolate
  from ._filters import mode2int, modes, _check_mode
label_desc: Use image node_id 5 for calling a global function with example usage: zoom(array, zoom, out, order, mode, cval, prefilter, output) and returns: out