Although I handled the singularity at x=0 for the functions: exp(-1\x)[return np.where(x != 0, np.exp(-1/x), 0)] and cos(1/x) [return np.where(x !=0, np.cos(1/x),0)]
I am getting the warning
"RuntimeWarning: divide by zero encountered in divide
How can I resolve this issue? Your response will be appreciated.
Although I handled the singularity at x=0 for the functions: exp(-1\x)[return np.where(x != 0, np.exp(-1/x), 0)] and cos(1/x) [return np.where(x !=0, np.cos(1/x),0)] I am getting the warning "RuntimeWarning: divide by zero encountered in divide How can I resolve this issue? Your response will be appreciated.