def nthroot(x, n):
    r = 1./n
    try:
        return float(x) ** r
    except (ValueError, __HOLE__):
        return complex(x) ** r
dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/math2.py/nthroot