'Compute final con. score for some connections.'

def compute_con(self, con_idx, n_epochs):

    if (self.con_scores is None):
        self.con_scores = np.zeros(self.csd_shape)
    sum_im_csd = self._acc[(0, con_idx)]
    sum_abs_im_csd = self._acc[(1, con_idx)]
    sum_sq_im_csd = self._acc[(2, con_idx)]
    denom = ((sum_abs_im_csd ** 2) - sum_sq_im_csd)
    z_denom = np.where((denom == 0.0))
    denom[z_denom] = 1.0
    con = (((sum_im_csd ** 2) - sum_sq_im_csd) / denom)
    con[z_denom] = 0.0
    self.con_scores[con_idx] = con
