#NEWLINE# def test_broadcast_arguments( self ) : #NEWLINE# #INDENT# rng_R = random_state_type ( ) #NEWLINE# low = tensor . dvector ( ) #NEWLINE# high = tensor . dcol ( ) #NEWLINE# ( post_r , out ) = uniform ( rng_R , low = low , high = high ) #NEWLINE# assert ( numpy_val2 . ndim == 2 ) #NEWLINE# f = compile . function ( [ rng_R , low , high ] , [ post_r , out ] , accept_inplace = True ) #NEWLINE# rng_state0 = numpy . random . RandomState ( utt . fetch_seed ( ) ) #NEWLINE# numpy_rng = numpy . random . RandomState ( utt . fetch_seed ( ) ) #NEWLINE# ( post0 , val0 ) = f ( rng_state0 , [ ( - 5 ) , 0.5 , 0 , 1 ] , [ [ 1.0 ] ] ) #NEWLINE# ( post1 , val1 ) = f ( post0 , [ 0.9 ] , [ [ 1.0 ] , [ 1.1 ] , [ 1.5 ] ] ) #NEWLINE# ( post2 , val2 ) = f ( post1 , [ ( - 5 ) , 0.5 , 0 , 1 ] , [ [ 1.0 ] , [ 1.1 ] , [ 1.5 ] ] ) #NEWLINE# numpy_val0 = numpy_rng . uniform ( low = [ ( - 5 ) , 0.5 , 0 , 1 ] , high = [ 1.0 ] ) #NEWLINE# numpy_val1 = numpy_rng . uniform ( low = [ 0.9 ] , high = [ [ 1.0 ] , [ 1.1 ] , [ 1.5 ] ] ) #NEWLINE# numpy_val2 = numpy_rng . uniform ( low = [ ( - 5 ) , 0.5 , 0 , 1 ] , high = [ [ 1.0 ] , [ 1.1 ] , [ 1.5 ] ] ) #NEWLINE# assert numpy . all ( ( val0 == numpy_val0 ) ) , ( val0 , numpy_val0 ) #NEWLINE# assert numpy . all ( ( val1 == numpy_val1 ) ) #NEWLINE# assert numpy . all ( ( val2 == numpy_val2 ) )