#NEWLINE# def test_hermite( ) : #NEWLINE# #INDENT# ( x , w ) = gauss_hermite ( 1 , 17 ) #NEWLINE# assert ( [ str ( r ) for r in x ] == [ '0' ] ) #NEWLINE# assert ( [ str ( r ) for r in w ] == [ '1.7724538509055160' ] ) #NEWLINE# ( x , w ) = gauss_hermite ( 2 , 17 ) #NEWLINE# assert ( [ str ( r ) for r in x ] == [ '-0.70710678118654752' , '0.70710678118654752' ] ) #NEWLINE# assert ( [ str ( r ) for r in w ] == [ '0.88622692545275801' , '0.88622692545275801' ] ) #NEWLINE# ( x , w ) = gauss_hermite ( 3 , 17 ) #NEWLINE# assert ( [ str ( r ) for r in x ] == [ '-1.2247448713915890' , '0' , '1.2247448713915890' ] ) #NEWLINE# assert ( [ str ( r ) for r in w ] == [ '0.29540897515091934' , '1.1816359006036774' , '0.29540897515091934' ] ) #NEWLINE# ( x , w ) = gauss_hermite ( 4 , 17 ) #NEWLINE# assert ( [ str ( r ) for r in x ] == [ '-1.6506801238857846' , '-0.52464762327529032' , '0.52464762327529032' , '1.6506801238857846' ] ) #NEWLINE# assert ( [ str ( r ) for r in w ] == [ '0.081312835447245177' , '0.80491409000551284' , '0.80491409000551284' , '0.081312835447245177' ] ) #NEWLINE# ( x , w ) = gauss_hermite ( 5 , 17 ) #NEWLINE# assert ( [ str ( r ) for r in x ] == [ '-2.0201828704560856' , '-0.95857246461381851' , '0' , '0.95857246461381851' , '2.0201828704560856' ] ) #NEWLINE# assert ( [ str ( r ) for r in w ] == [ '0.019953242059045913' , '0.39361932315224116' , '0.94530872048294188' , '0.39361932315224116' , '0.019953242059045913' ] )