def cscore(v1, v2):
 v1_b = v1.astype(bool)
 v2_b = v2.astype(bool)
 sij = (v1_b * v2_b).sum()
 return ((v1_b.sum() - sij) * (v2_b.sum() - sij))

def cscore ( v1 , v2 ) : v1_b = v1 . astype ( bool ) v2_b = v2 . astype ( bool ) sij = ( v1_b * v2_b ) . sum ( ) return ( ( v1_b . sum ( ) - sij ) * ( v2_b . sum ( ) - sij ) )
calculate c-score between v1 and v2 according to stone and roberts 1990 .