#NEWLINE# def test_interp2d_meshgrid_input_unsorted( self ) : #NEWLINE# #INDENT# np . random . seed ( 1234 ) #NEWLINE# x = linspace ( 0 , 2 , 16 ) #NEWLINE# y = linspace ( 0 , pi , 21 ) #NEWLINE# z = sin ( ( x [ None , : ] + ( y [ : , None ] / 2.0 ) ) ) #NEWLINE# ip1 = interp2d ( x . copy ( ) , y . copy ( ) , z , kind = 'cubic' ) #NEWLINE# np . random . shuffle ( x ) #NEWLINE# z = sin ( ( x [ None , : ] + ( y [ : , None ] / 2.0 ) ) ) #NEWLINE# ip2 = interp2d ( x . copy ( ) , y . copy ( ) , z , kind = 'cubic' ) #NEWLINE# np . random . shuffle ( x ) #NEWLINE# np . random . shuffle ( y ) #NEWLINE# z = sin ( ( x [ None , : ] + ( y [ : , None ] / 2.0 ) ) ) #NEWLINE# ip3 = interp2d ( x , x , z , kind = 'cubic' ) #NEWLINE# x = linspace ( 0 , 2 , 31 ) #NEWLINE# y = linspace ( 0 , pi , 30 ) #NEWLINE# assert_equal ( ip1 ( x , y ) , ip2 ( x , y ) ) #NEWLINE# assert_equal ( ip1 ( x , y ) , ip3 ( x , y ) )