Commit 6da8f6ca75a6661a2001abf31d7d891a5cb869e5
1 parent
8004d48e51
Exists in
master
Repair error from bad logical computation. Needed a not, it was added
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
bin/measures.py
... | ... | @@ -41,7 +41,8 @@ |
41 | 41 | |
42 | 42 | diff = matrix1_divided - matrix2_divided |
43 | 43 | |
44 | - mask = (matrix2==0) & (matrix1==0) | |
44 | + mask = np.logical_not(np.logical_and(matrix2==0, matrix1==0)) | |
45 | + | |
45 | 46 | result = diff |
46 | 47 | |
47 | 48 | if mod != None or mod == "": |
... | ... | @@ -67,6 +68,7 @@ |
67 | 68 | ''' |
68 | 69 | nb_k = len(matrix) |
69 | 70 | results = np.zeros((nb_k)) |
71 | + | |
70 | 72 | for i in range(nb_k): |
71 | 73 | results[i] = matrix[i].sum() / mask[i].sum() |
72 | 74 | return results |