#NEWLINE# def test_random_integers( self ) : #NEWLINE# #INDENT# 'Test that raw_random.random_integers generates the same\n        results as numpy.' #NEWLINE# rng_R = random_state_type ( ) #NEWLINE# ( post_r , out ) = random_integers ( rng_R , ( 11 , 8 ) , ( - 3 ) , 16 ) #NEWLINE# f = compile . function ( [ compile . In ( numpy_val0 , value = numpy . random . RandomState ( utt . fetch_seed ( ) ) , update = post_r , mutable = True ) ] , [ out ] , accept_inplace = True ) #NEWLINE# numpy_rng = numpy . random . RandomState ( utt . fetch_seed ( ) ) #NEWLINE# val0 = f ( ) #NEWLINE# val1 = f ( ) #NEWLINE# numpy_val0 = numpy_rng . random_integers ( ( - 3 ) , 16 , size = ( 11 , 8 ) ) #NEWLINE# numpy_val1 = numpy_rng . random_integers ( ( - 3 ) , 16 , size = ( 11 , 8 ) ) #NEWLINE# print ( val0 ) #NEWLINE# print ( numpy_val0 ) #NEWLINE# print ( val1 ) #NEWLINE# print ( numpy_val1 ) #NEWLINE# self . assertTrue ( numpy . allclose ( val0 , numpy_val0 ) ) #NEWLINE# self . assertTrue ( numpy . allclose ( val1 , numpy_val1 ) )