def check_cdf_slope(cdf):
 norm_intensity = np.linspace(0, 1, len(cdf))
 (slope, intercept) = np.polyfit(norm_intensity, cdf, 1)
 assert (0.9 < slope < 1.1)

def check_cdf_slope ( cdf ) : norm_intensity = np . linspace ( 0 , 1 , len ( cdf ) ) ( slope , intercept ) = np . polyfit ( norm_intensity , cdf , 1 ) assert ( 0.9 < slope < 1.1 )
slope of cdf which should equal 1 for an equalized histogram .