added function to compute mutual information between arbitrary vectors