code: def integral(f, in_place=False, dtype=np.double):
      """
      fi = integral(f, in_place=False, dtype=np.double):
  
      Compute integral image
  
      Parameters
      ----------
      f : ndarray
          input image. Only 2-D images are supported.
      in_place : bool, optional
          Whether to overwrite `f` (default: False).
      dtype : dtype, optional
          dtype to use (default: double)
  
      Returns
      -------
      fi : ndarray of `dtype` of same shape as `f`
          The integral image
      """
      if f.ndim != 2:
          raise ValueError(
              "mahotas.surf.integral: Can only handle 2D-images (i.e., greyscale images)."
          )
      if not in_place:
          if dtype != f.dtype:
              f = f.astype(dtype)
          else:
              f = f.copy()
      return _surf.integral(f)
  
file_path: mahotas/mahotas/features/surf.py
imports: from __future__ import division
  import numpy
  from .None import _surf
label_desc: Use image node_id 1 for calling a global function with example usage: integral(f, in_place, dtype) and returns: _surf