瀏覽代碼

Fix the average lifetime residuals bug

Vadim Markovtsev 7 年之前
父節點
當前提交
271f56ada2
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      labours.py

+ 1 - 0
labours.py

@@ -43,6 +43,7 @@ def calculate_average_lifetime(matrix):
                 start += 1
                 continue
             lifetimes[i - start] = band[i - 1] - line
+        lifetimes[i - start] = band[i - 1]
     return (lifetimes.dot(numpy.arange(1, matrix.shape[1], 1))
             / (lifetimes.sum() * matrix.shape[1]))