def all_correlations_book_version(bait, target):
 return np.array([np.corrcoef(bait, c)[(0, 1)] for c in target])

def all_correlations_book_version ( bait , target ) : return np . array ( [ np . corrcoef ( bait , c ) [ ( 0 , 1 ) ] for c in target ] )
corrs = all_correlations corrs[i] is the correlation between bait and target[i] .