from numpy import *

def f(x):
    return [x[0] - 3 * x[1] + 1j + 2, x[0] + x[1]]

def real_f(x1):
    x = [x1[0] + 1j * x1[1], x1[2] + 1j * x1[3]]
actual_f = f(x)
return [real(actual_f[0]), imag(actual_f[0]), real(actual_f[1]), imag(
    actual_f[1])]
Поиск сложных корней из набора нелинейных уравнений в питоне