ubsuny / 23-Homework6G5

MIT License
0 stars 8 forks source link

Singularity issue #18

Closed tirthbha closed 7 months ago

tirthbha commented 7 months ago

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.

poojashresthacode commented 7 months ago

I haven't encountered that, will update you if I find any clue regarding this

tirthbha commented 7 months ago

I have resolved this issue now.