code: def locmax(f, Bc=None, out=None, output=None):
      """
      filtered = locmax(f, Bc={3x3 cross}, out={np.empty(f.shape, bool)})
  
      Local maxima
  
      Parameters
      ----------
      f : ndarray
      Bc : ndarray, optional
          structuring element
      out : ndarray, optional
          Used for output. Must be Boolean ndarray of same size as `f`
      output : deprecated
          Do not use
  
      Returns
      -------
      filtered : ndarray
          boolean image of same size as f.
  
      See Also
      --------
      regmax : function
          Regional maxima. This is a stricter criterion than the local maxima as
          it takes the whole object into account and not just the neighbourhood
          defined by ``Bc``::
  
              0 0 0 0 0
              0 0 2 0 0
              0 0 2 0 0
              0 0 3 0 0
              0 0 3 0 0
              0 0 0 0 0
  
          The top 2 is a local maximum because it has the maximal value in its
          neighbourhood, but it is not a regional maximum.
  
      locmin : function
          Local minima
      """
      Bc = get_structuring_elem(f, Bc)
      output = _get_output(f, out, "locmax", np.bool_, output=output)
      Bc = _remove_centre(Bc.copy())
      return _morph.locmin_max(f, Bc, output, False)
  
imports: from __future__ import division
  import numpy
  from .internal import _get_output, _verify_is_integer_type, _check_2
  from .None import _morph
label_desc: Use image node_id 14 for calling a global function with example usage: locmax(f, Bc, out, output) and returns: _morph