SymPy returning Any[]

I am experimenting with the SymPy module, and I wrote the following code to estimate moments 1 and 2 given moments 3 and 4. With two equations and two unknowns I should get exact answers, but the following code returns “any”. Does anyone know why this happens?


m3 = mean(inv07.^3)

m4 = mean(inv07.^4)

using SymPy

# define the symbols for the unknowns

x, y = symbols("x y")

# define the equations

eq1 = 3*x^2*y + y^3 - m3

eq2 = 3x^4 + 6*x^2*y^2 +y^4 - m4

# solve the system of equations

soln = solve([eq1, eq2], [x, y])

println(soln)

No solution was found is the reason. You likely need a numeric, not symbolic, answer.

1 Like