Sympy to numpy causes the AttributeError: 'Symbol' object has no attribute 'cos'
I am trying to do partial derivatives using sympy and I want to convert it to a function so that I can substitute values and estimate the derivatives at some values of t_1, t_2. The code I am using is as follows: import sympy as sp import numpy as np from sympy import init_printing init_printing() t_1,t_2,X_1,X_2,Y_1,Y_2,X_c1,X_c2,Y_c1,Y_c2,a_1,a_2,psi_1,psi_2,b_1,b_2= sp.symbols('t_1 t_2 X_1 X_2 Y_1 Y_2 X_c1 X_c2 Y_c1 Y_c2 a_1 a_2 psi_1 psi_2 b_1 b_2') X_1=X_c1 + (a_1 * sp.cos(t_1) * sp.cos(psi_1)) - ((b_1) * sp.sin(t_1)* sp.sin(psi_1)) X_2=X_c2 + (a_2 * sp.cos(t_2) * sp.cos(psi_2)) - ((b_2)