code: def eccentricity(bwimage):
      """
      ecc = eccentricity(bwimage)
  
      Compute eccentricity
  
      Parameters
      ----------
      bwimage : ndarray
          Interpreted as a boolean image
  
      Returns
      -------
      r : float
          Eccentricity measure
      """
      semimajor, semiminor = ellipse_axes(bwimage)
      if semimajor == 0.0:
          return 0.0
      return np.sqrt(semimajor**2 - semiminor**2) / semimajor
  
file_path: mahotas/mahotas/features/shape.py
imports: from __future__ import division
  import numpy
  import mahotas
  from ..labeled import bwperim
  from ..internal import _make_binary
label_desc: Use image node_id 3 for calling a global function with example usage: eccentricity(bwimage) and returns: unknown, int