Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sambit Giri authored and Sambit Giri committed Aug 5, 2020
1 parent f4b9cd3 commit 1573550
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t2c/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def EulerCharacteristic(data, thres=0.5, neighbors=6, use_numba=False):
#E = VB.EulerCharacteristic_seq(C)/2. + VB.EulerCharacteristic_seq(D)/2.
elem, count = np.unique(C, return_counts=1)
V = count[elem==1] if len(count[elem==1])!=0 else 0
E = count[elem==2] if len(count[elem==1])!=0 else 0
F = count[elem==3] if len(count[elem==1])!=0 else 0
C = count[elem==4] if len(count[elem==1])!=0 else 0
E = count[elem==2] if len(count[elem==2])!=0 else 0
F = count[elem==3] if len(count[elem==3])!=0 else 0
C = count[elem==4] if len(count[elem==4])!=0 else 0
return float(V-E+F-C)

def betti0(data, thres=0.5, neighbors=6):
Expand Down

0 comments on commit 1573550

Please sign in to comment.