@staticmethod
def argsort(seq):
    """
        Find the indices of a sequence after being sorted. Code taken from 
        http://stackoverflow.com/questions/3071415/efficient-method-to-calculate-the-rank-vector-of-a-list-in-python
        """
    return sorted(range(len(seq)), key=seq.__getitem__)
