You may try with ks_2samp, like the following .. stat, p = stats.ks_2samp(a, b, alternative='two-sided')