def test_jacobian_self(): q = Array((num2, num3)) jac = q.jacobian(q) assert jac[0, 0] == 1 assert jac[0, 1] == 0 assert jac[1, 0] == 0 assert jac[1, 1] == 1
def test_jacobian_scalar(): q = Array((num2, num3)) jac = q.jacobian(q[0]) assert jac[0] == 1 assert jac[1] == 0