#NEWLINE# def test_mod( ) : #NEWLINE# #INDENT# if ( not np ) : #NEWLINE# #INDENT# skip ( 'NumPy not installed' ) #NEWLINE# #UNINDENT# e = Mod ( a , b ) #NEWLINE# f = lambdify ( ( a , b ) , e ) #NEWLINE# a_ = np . array ( [ 0 , 1 , 2 , 3 ] ) #NEWLINE# b_ = 2 #NEWLINE# assert np . array_equal ( f ( a_ , b_ ) , [ 0 , 1 , 0 , 1 ] ) #NEWLINE# a_ = np . array ( [ 0 , 1 , 2 , 3 ] ) #NEWLINE# b_ = np . array ( [ 2 , 2 , 2 , 2 ] ) #NEWLINE# assert np . array_equal ( f ( a_ , b_ ) , [ 0 , 1 , 0 , 1 ] ) #NEWLINE# a_ = np . array ( [ 2 , 3 , 4 , 5 ] ) #NEWLINE# b_ = np . array ( [ 2 , 3 , 4 , 5 ] ) #NEWLINE# assert np . array_equal ( f ( a_ , b_ ) , [ 0 , 0 , 0 , 0 ] )