code: def maximum_position_of_labels(image, labels, indices):
      '''Return the i,j coordinates of the maximum value within each object
      
      image - measure the maximum within this image
      labels - use the objects within this labels matrix
      indices - label #s to measure
      
      The result returned is an 2 x n numpy array where n is the number
      of the label minus one, result[0,x] is the i coordinate of the center
      and result[x,1] is the j coordinate of the center.
      '''
      
      if len(indices) == 0:
          return np.zeros((2,0),int)
      
      result = scind.maximum_position(image, labels, indices)
      result = np.array(result,int)
      if result.ndim == 1:
          result.shape = (2,1)
          return result
      return result.transpose(f maximum_position_of_labels(image, labels, indices):
      '''Return the i,j coordinates of the maximum value within each object
      
      image - measure the maximum within this image
      labels - use the objects within this labels matrix
      indices - label #s to measure
      
      The result returned is an 2 x n numpy array where n is the number
      of the label minus one, result[0,x] is the i coordinate of the center
      and result[x,1] is the j coordinate of the center.
      '''
      
      if len(indices) == 0:
          return np.zeros((2,0),int)
      
      result = scind.maximum_position(image, labels, indices)
      result = np.array(result,int)
      if result.ndim == 1:
          result.shape = (2,1)
          return result
      return result.transpose()
docs: Return the i,j coordinates of the maximum value within each object
      
      image - measure the maximum within this image
      labels - use the objects within this labels matrix
      indices - label #s to measure
      
      The result returned is an 2 x n numpy array where n is the number
      of the label minus one, result[0,x] is the i coordinate of the center
      and result[x,1] is the j coordinate of the center.