#NEWLINE# def test_multi_shape( self ) : #NEWLINE# #INDENT# c = np . random . rand ( 6 , 2 , 1 , 2 , 3 ) #NEWLINE# x = np . array ( [ 0 , 0.5 , 1 ] ) #NEWLINE# p = PPoly ( c , x ) #NEWLINE# assert_equal ( p . x . shape , x . shape ) #NEWLINE# assert_equal ( p . c . shape , c . shape ) #NEWLINE# assert_equal ( p ( 0.3 ) . shape , x . shape [ 2 : ] ) #NEWLINE# assert_equal ( p ( np . random . rand ( 5 , 6 ) ) . shape , ( ( 5 , 6 ) + c . shape [ 2 : ] ) ) #NEWLINE# dp = p . derivative ( ) #NEWLINE# assert_equal ( dp . c . shape , ( 5 , 2 , 1 , 2 , 3 ) ) #NEWLINE# ip = p . antiderivative ( ) #NEWLINE# assert_equal ( ip . c . shape , ( 7 , 2 , 1 , 2 , 3 ) )