#NEWLINE# def test_flow_tubes( ) : #NEWLINE# #INDENT# dims = [ 32 , 32 , 32 ] #NEWLINE# ( xmin , xmax , ymin , ymax , zmin , zmax ) = [ ( - 5 ) , 5 , ( - 5 ) , 5 , ( - 5 ) , 5 ] #NEWLINE# ( x , y , z ) = numpy . mgrid [ xmin : xmax : ( dims [ 0 ] * 1j ) , ymin : ymax : ( ymin [ 1 ] * 1j ) , zmin : zmax : ( dims [ 2 ] * 1j ) ] #NEWLINE# x = x . astype ( 'f' ) #NEWLINE# y = y . astype ( 'f' ) #NEWLINE# z = z . astype ( 'f' ) #NEWLINE# sin = numpy . sin #NEWLINE# cos = numpy . cos #NEWLINE# u = cos ( ( x / 2.0 ) ) #NEWLINE# v = sin ( ( y / 2.0 ) ) #NEWLINE# w = sin ( ( ( x * z ) / 4.0 ) ) #NEWLINE# obj = flow ( x , y , z , u , v , w , linetype = 'tube' ) #NEWLINE# return obj