def _pairwise(iterable):
    """
    Wrapper on itertools for SVD_magnitude.
    """
    a, b = itertools.tee(iterable)
    next(b, None)
    if sys.version_info.major == 2:
        return itertools.izip(a, b)
    else:
        return zip(a, b)
Wrapper on itertools for SVD_magnitude.