#NEWLINE# def test_simple_3d( self ) : #NEWLINE# #INDENT# np . random . seed ( 1234 ) #NEWLINE# c = np . random . rand ( 4 , 5 , 6 , 7 , 8 , 9 ) #NEWLINE# x = np . linspace ( 0 , 1 , ( 7 + 1 ) ) #NEWLINE# y = ( np . linspace ( 0 , 1 , ( 8 + 1 ) ) ** 2 ) #NEWLINE# z = ( np . linspace ( 0 , 1 , ( 9 + 1 ) ) ** 3 ) #NEWLINE# xi = np . random . rand ( 40 ) #NEWLINE# yi = np . random . rand ( 40 ) #NEWLINE# zi = np . random . rand ( 40 ) #NEWLINE# p = NdPPoly ( c , ( x , y , z ) ) #NEWLINE# for nu in ( None , ( 0 , 0 , 0 ) , ( 0 , 1 , 0 ) , ( 1 , 0 , 0 ) , ( 2 , 3 , 0 ) , ( 6 , 0 , 2 ) ) : #NEWLINE# #INDENT# v1 = p ( ( xi , yi , zi ) , nu = nu ) #NEWLINE# v2 = _ppoly3d_eval ( c , ( x , y , z ) , xi , yi , zi , nu = nu ) #NEWLINE# assert_allclose ( v1 , v2 , err_msg = repr ( nu ) )