#NEWLINE# def test_extend( self ) : #NEWLINE# #INDENT# np . random . seed ( 1234 ) #NEWLINE# order = 3 #NEWLINE# x = np . unique ( np . r_ [ ( 0 , ( 10 * np . random . rand ( 30 ) ) , 10 ) ] ) #NEWLINE# c = ( ( 2 * np . random . rand ( ( order + 1 ) , ( len ( x ) - 1 ) , 2 , 3 ) ) - 1 ) #NEWLINE# for cls in ( PPoly , BPoly ) : #NEWLINE# #INDENT# pp = cls ( c [ : , : 9 ] , x [ : 10 ] ) #NEWLINE# pp . extend ( c [ : , 9 : ] , x [ 10 : ] ) #NEWLINE# pp2 = cls ( c [ : , 10 : ] , x [ 10 : ] ) #NEWLINE# pp2 . extend ( c [ : , : 10 ] , x [ : 10 ] , right = False ) #NEWLINE# pp3 = cls ( c , x ) #NEWLINE# assert_array_equal ( c . c , pp3 . c ) #NEWLINE# assert_array_equal ( pp . x , pp3 . x ) #NEWLINE# assert_array_equal ( pp2 . c , pp3 . c ) #NEWLINE# assert_array_equal ( pp2 . x , pp3 . x )