Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError: division by zero Ask how to solve #1

Open
wd1969 opened this issue Mar 8, 2020 · 2 comments
Open

ZeroDivisionError: division by zero Ask how to solve #1

wd1969 opened this issue Mar 8, 2020 · 2 comments

Comments

@wd1969
Copy link

wd1969 commented Mar 8, 2020

in S_Dbw_result(self)
74 compute the final result
75 """
---> 76 return self.Dens_bw()+self.Scat()

in Dens_bw(self)
53 if i==j:
54 continue
---> 55 result += self.density([i,j])/max(density_list[i],density_list[j])
56 return result/(self.k*(self.k-1))
57

ZeroDivisionError: division by zero

@Teddylee4real
Copy link

I got the same problem

@oYoungCo
Copy link

a problem in the code.
std_matrix_i = np.std(data[self.data_cluster == i],axis=0)
should compute var instead of std.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants