def compare_medians_ms(group_1, group_2, axis=None):
 (med_1, med_2) = (ma.median(group_1, axis=axis), ma.median(group_2, axis=axis))
 (std_1, std_2) = (mstats.stde_median(group_1, axis=axis), mstats.stde_median(group_2, axis=axis))
 W = (np.abs((med_1 - med_2)) / ma.sqrt(((std_1 ** 2) + (std_2 ** 2))))
 return (1 - norm.cdf(W))

def compare_medians_ms ( group_1 , group_2 , axis = None ) : ( med_1 , med_2 ) = ( ma . median ( group_1 , axis = axis ) , ma . median ( group_2 , axis = axis ) ) ( std_1 , std_2 ) = ( mstats . stde_median ( group_1 , axis = axis ) , mstats . stde_median ( group_2 , axis = axis ) ) W = ( np . abs ( ( med_1 - med_2 ) ) / ma . sqrt ( ( ( std_1 ** 2 ) + ( std_2 ** 2 ) ) ) ) return ( 1 - norm . cdf ( W ) )
compares the medians from two independent groups along the given axis .