0

I have generated a function with lambdify, and can only output values with the function if i specify all specific arguments, one by one. I want to be able to feed the function phi_num, with the q, numpy array. Like phi_num(q).

I have tried change in the numpy array to tuple and tried to run through all val, as shown.

So as shown, phi_calc outputs values, but option b and a doesnt.

phi_num = lambdify((x1, y1, theta1, x2, y2, theta2, x3, y3, theta3, t), phi_k, modules='numpy')

q = np.asarray([1.5, 1.8, 10*np.pi/180, 1, 1.7, 20*np.pi/180, -1, 1, 10*np.pi/180,1])

phi_calc = phi_num(q[0], q[1], q[2], q[3], q[4], q[5], q[6], q[7], q[8], q[9])

q_tup = tuple(q)

b = phi_num(q_tup)

a = phi_num([val for val in q])

0 Answers0