code: def calcDistMatchArr(matchArr, tKey, mKey):
      
      #Calculate all sorted list of all eucledian feature distances
      matchArrSize = listvalues(matchArr)[0].size
  
      distInfo = {'posPairs': list(), 'eucDist': list()}
      _matrix = numpy.swapaxes(numpy.array([matchArr[tKey], matchArr[mKey]]), 0, 1)
  
      for pos1 in range(matchArrSize-1):
          for pos2 in range(pos1+1, matchArrSize):
              distInfo['posPairs'].append((pos1, pos2))
      distInfo['posPairs'] = numpy.array(distInfo['posPairs'])
      distInfo['eucDist'] = scipy.spatial.distance.pdist(_matrix)
  
      distSort = numpy.argsort(distInfo['eucDist'])
      for key in list(viewkeys(distInfo)):
          distInfo[key] = distInfo[key][distSort]
  
      return distInfo
docs: Calculate the euclidean distance of all array positions in "matchArr".
  
      :param matchArr: a dictionary of ``numpy.arrays`` containing at least two
          entries that are treated as cartesian coordinates.
      :param tKey: #TODO: docstring
      :param mKey: #TODO: docstring
  
      :returns: #TODO: docstring
  
              {'eucDist': numpy.array([eucDistance, eucDistance, ...]),
               'posPairs': numpy.array([[pos1, pos2], [pos1, pos2], ...])
               }