#NEWLINE# def test_deriv_inplace( self ) : #NEWLINE# #INDENT# np . random . seed ( 1234 ) #NEWLINE# ( m , k ) = ( 5 , 8 ) #NEWLINE# x = np . sort ( np . random . random ( m ) ) #NEWLINE# c = np . random . random ( ( k , ( m - 1 ) ) ) #NEWLINE# for cc in [ c . copy ( ) , ( c * ( 1.0 + 2j ) ) ] : #NEWLINE# #INDENT# bp = BPoly ( cc , x ) #NEWLINE# xp = np . linspace ( x [ 0 ] , x [ ( - 1 ) ] , 21 ) #NEWLINE# for i in range ( k ) : #NEWLINE# #INDENT# assert_allclose ( bp ( xp , i ) , bp . derivative ( i ) ( xp ) )