def median_absolute_deviation(x):
 x = asarray(x)
 median_x = median(x)
 median_abs_deviation = median(abs((x - median_x)))
 return (median_abs_deviation, median_x)

def median_absolute_deviation ( x ) : x = asarray ( x ) median_x = median ( x ) median_abs_deviation = median ( abs ( ( x - median_x ) ) ) return ( median_abs_deviation , median_x )
compute the median of the absolute deviations from the median .