It couldn’t be rubies?

  • C126@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 month ago

    import sympy as sp

    x, y, z = sp.symbols(‘x y z’)

    Fx = sp.Function(‘Fx’)(x, y, z)

    Fy = sp.Function(‘Fy’)(x, y, z)

    Fz = sp.Function(‘Fz’)(x, y, z)

    F = sp.Matrix([Fx, Fy, Fz])

    nabla = sp.Matrix([sp.diff(Fx, x), sp.diff(Fy, y), sp.diff(Fz, z)])

    curl_F = F.jacobian([x, y, z]).transpose() - nabla

    sp.pprint(curl_F)