#NEWLINE# def binary_ufunc_check_no_same_args( fun , lims_A = [ ( - 2 ) , 2 ] , lims_B = [ ( - 2 ) , 2 ] , test_complex = True ) : #NEWLINE# #INDENT# T_A = ( lambda x : transform ( lims_A , x ) ) #NEWLINE# T_B = ( lambda x : transform ( lims_B , x ) ) #NEWLINE# scalar_int1 = 2 #NEWLINE# scalar_int2 = 3 #NEWLINE# scalar1 = 0.6 #NEWLINE# scalar2 = 0.7 #NEWLINE# vector1 = npr . rand ( 2 ) #NEWLINE# vector2 = npr . rand ( 2 ) #NEWLINE# mat11 = npr . rand ( 3 , 2 ) #NEWLINE# mat12 = npr . rand ( 3 , 2 ) #NEWLINE# mat21 = npr . rand ( 1 , 2 ) #NEWLINE# mat22 = npr . rand ( 1 , 2 ) #NEWLINE# combo_check ( fun , ( 0 , 1 ) , [ T_A ( scalar1 ) , T_A ( scalar_int1 ) , T_A ( vector1 ) , T_A ( mat11 ) , T_A ( mat21 ) ] , [ T_B ( scalar2 ) , T_B ( scalar_int2 ) , T_B ( vector2 ) , T_B ( mat12 ) , T_B ( mat22 ) ] ) #NEWLINE# if test_complex : #NEWLINE# #INDENT# comp1 = ( 0.6 + 0.3j ) #NEWLINE# comp2 = ( 0.1 + 0.2j ) #NEWLINE# matc1 = ( npr . rand ( 3 , 2 ) + ( 0.1j * npr . rand ( 3 , 2 ) ) ) #NEWLINE# matc2 = ( npr . rand ( 3 , 2 ) + ( 0.1j * npr . rand ( 3 , 2 ) ) ) #NEWLINE# combo_check ( fun , ( 0 , 1 ) , [ T_A ( scalar1 ) , T_A ( comp1 ) , T_A ( vector1 ) , T_A ( matc1 ) , T_A ( mat21 ) ] , [ T_B ( scalar2 ) , T_B ( comp2 ) , T_B ( vector2 ) , T_B ( matc2 ) , T_B ( mat22 ) ] )