ubsuny / 23-Homework6G2

Apache License 2.0
0 stars 9 forks source link

Singularity Issue #23

Closed tirthbha closed 9 months ago

tirthbha commented 9 months ago

I tried to estimate the integrals for the three functions listed on the task1 using three methods as mentioned in the task1. 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
@AhmedCode99 @LinxuanHu How have you resolve this issue, assuming that you have gone through this step?

reshnashrestha commented 9 months ago

@tirthbha the similar thing is discussed here. https://github.com/ubsuny/23-Homework6G2/issues/16

AhmedCode99 commented 9 months ago

This is a possible way of dealing with a singularity: (https://github.com/ubsuny/23-Homework6G2/issues/47)

tirthbha commented 9 months ago

@reshnashrestha @AhmedCode99 Thanks guys!