~maddevelopers/mg5amcnlo/2.6.6_py3

« back to all changes in this revision

Viewing changes to madgraph/loop/loop_exporters.py

  • Committer: olivier-mattelaer
  • Date: 2019-07-22 15:16:58 UTC
  • Revision ID: olivier-mattelaer-20190722151658-y5snv25jxb1a63op
fixing more tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
791
791
                assert not (real_num!=0 and imag_num!=0), "MadGraph5_aMC@NLO found a "+\
792
792
                  "color matrix element which has both a real and imaginary part."
793
793
                if imag_num!=0:
794
 
                    res=fractions.Fraction(imag_num,common_denom)
 
794
                    assert int(imag_num) == imag_num and int(common_denom) == common_denom
 
795
                    res=fractions.Fraction(int(imag_num),int(common_denom))
795
796
                    line_num.append(res.numerator)
796
797
                    # Negative denominator means imaginary color coef of the
797
798
                    # final color matrix
798
799
                    line_denom.append(res.denominator*-1)
799
800
                else:
800
 
                    misc.sprint(real_num, common_denom)
801
 
                    res=fractions.Fraction(real_num,common_denom)
 
801
                    assert int(real_num) == real_num and int(common_denom) == common_denom
 
802
                    res=fractions.Fraction(int(real_num),int(common_denom))
802
803
                    line_num.append(res.numerator)
803
804
                    # Positive denominator means real color coef of the final color matrix
804
805
                    line_denom.append(res.denominator)