def complexify(r):
    """
        Turns a real number into a complex number if it not complex, otherwise
        returns the same number.
    """
    return complex(r) if not type(r) == complex else r