#NEWLINE# def test_contrast2( self ) : #NEWLINE# #INDENT# dummy = formula . Term ( 'zero' ) #NEWLINE# self . namespace [ 'zero' ] = np . zeros ( ( 40 , ) , np . float64 ) #NEWLINE# term = ( dummy + term . terms [ 2 ] ) #NEWLINE# c = contrast . Contrast ( term , self . formula ) #NEWLINE# test = ( ( ( [ 0 ] * 2 ) + [ 1 ] ) + ( [ 0 ] * 7 ) ) #NEWLINE# assert_almost_equal ( c . matrix , test )