From 157355083c9165ff23873dd8b466bc18e38dbe5f Mon Sep 17 00:00:00 2001 From: Sambit Giri Date: Wed, 5 Aug 2020 15:15:33 +0200 Subject: [PATCH] minor fix --- t2c/topology.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t2c/topology.py b/t2c/topology.py index 1639a48..5279515 100644 --- a/t2c/topology.py +++ b/t2c/topology.py @@ -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):