#NEWLINE# def test_skew( self ) : #NEWLINE# #INDENT# tm . _skip_if_no_scipy ( ) #NEWLINE# from scipy.stats import skew #NEWLINE# alt = ( lambda x : skew ( x , bias = False ) ) #NEWLINE# self . _check_stat_op ( 'skew' , alt ) #NEWLINE# min_N = 3 #NEWLINE# for i in range ( 1 , ( min_N + 1 ) ) : #NEWLINE# #INDENT# s = Series ( np . ones ( i ) ) #NEWLINE# df = DataFrame ( np . ones ( ( i , i ) ) ) #NEWLINE# if ( i < min_N ) : #NEWLINE# #INDENT# self . assertTrue ( np . isnan ( s . skew ( ) ) ) #NEWLINE# self . assertTrue ( np . isnan ( df . skew ( ) ) . all ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertEqual ( 0 , s . skew ( ) ) #NEWLINE# self . assertTrue ( ( df . skew ( ) == 0 ) . all ( ) )