@classmethod
    def eval(cls, n, m, z=None):
        if z is not None:
            n, z, m = n, m, z
            k = 2*z/pi
            if n == S.Zero:
                return elliptic_f(z, m)
            elif n == S.One:
                return (elliptic_f(z, m) +
                        (sqrt(1 - m*sin(z)**2)*tan(z) -
                         elliptic_e(z, m))/(m - 1))
            elif k.is_integer:
                return k*elliptic_pi(n, m)
            elif m == S.Zero:
                return atanh(sqrt(n - 1)*tan(z))/sqrt(n - 1)
            elif n == m:
                return (elliptic_f(z, n) - elliptic_pi(1, z, n) +
                        tan(z)/sqrt(1 - n*sin(z)**2))
            elif n in (S.Infinity, S.NegativeInfinity):
                return S.Zero
            elif m in (S.Infinity, S.NegativeInfinity):
                return S.Zero
            elif z.could_extract_minus_sign():
                return -elliptic_pi(n, -z, m)
        else:
            if n == S.Zero:
                return elliptic_k(m)
            elif n == S.One:
                return S.ComplexInfinity
            elif m == S.Zero:
                return pi/(2*sqrt(1 - n))
            elif m == S.One:
                return -S.Infinity/sign(n - 1)
            elif n == m:
                return elliptic_e(n)/(1 - n)
            elif n in (S.Infinity, S.NegativeInfinity):
                return S.Zero
            elif m in (S.Infinity, S.NegativeInfinity):
                return S.Zero
dataset/ETHPy150Open sympy/sympy/sympy/functions/special/elliptic_integrals.py/elliptic_pi.eval/swapped operands of `-`