def test_pmf_hist_normalization():
 (x, h, w) = utils.pmf_hist(a_norm)
 nose.tools.assert_almost_equal(sum(h), 1)
 nose.tools.assert_less_equal(h.max(), 1)

def test_pmf_hist_normalization ( ) : ( x , h , w ) = utils . pmf_hist ( a_norm ) nose . tools . assert_almost_equal ( sum ( h ) , 1 ) nose . tools . assert_less_equal ( h . max ( ) , 1 )
test that output data behaves like a pmf .