~maddevelopers/mg5amcnlo/dim6_eft

« back to all changes in this revision

Viewing changes to aloha/aloha_lib.py

  • Committer: olivier Mattelaer
  • Date: 2014-09-24 20:33:52 UTC
  • mfrom: (253.17.56 2.2.0)
  • Revision ID: olivier.mattelaer@uclouvain.be-20140924203352-bplvftjd8czlhagt
pass to 2.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
938
938
                    if not veto or not scalar.contains(veto):
939
939
                        scalar = scalar.simplify()
940
940
                        prefactor = 1
 
941
 
941
942
                        if hasattr(scalar, 'vartype') and scalar.prefactor not in  [1,-1]:
942
943
                            prefactor = scalar.prefactor
943
944
                            scalar.prefactor = 1
1048
1049
            else:
1049
1050
                raise self.LorentzObjectRepresentationError("There is no key of (0,) in representation.")                    
1050
1051
        else:
1051
 
            self[(0,)] = representation
 
1052
            if isinstance(representation,dict):
 
1053
                try:
 
1054
                    self[(0,)] = representation[(0,)]
 
1055
                except Exception:
 
1056
                    if representation:
 
1057
                                    raise LorentzObjectRepresentation.LorentzObjectRepresentationError("There is no key of (0,) in representation.")
 
1058
                    else:
 
1059
                                    self[(0,)] = 0
 
1060
            else:
 
1061
                self[(0,)] = representation
1052
1062
 
1053
1063
    def __str__(self):
1054
1064
        """ string representation """