Ticket #1115: 1115-sha_prec-1.patch

File 1115-sha_prec-1.patch, 1.4 KB (added by cremona, 13 years ago)
  • sage/schemes/elliptic_curves/ell_rational_field.py

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1220437680 -3600
    # Node ID 2ad2b753b007d786452ada18328de93e7bf2bb28
    # Parent  8b27d76364b3639bae611329a30b123171f57a9c
    #1115: fix getting of gens from database curve
    
    diff -r 8b27d76364b3 -r 2ad2b753b007 sage/schemes/elliptic_curves/ell_rational_field.py
    a b  
    13311331
    13321332        # If the optional extended database is installed and an
    13331333        # isomorphic curve is in the database then its gens will be
    1334         # known:
     1334        # known; if only the default database is installed, the rank
     1335        # will be known but not the gens.
    13351336
    13361337        if use_database:
    13371338            try:
    13381339                E = self.database_curve()
    13391340                iso = E.isomorphism_to(self)
    1340                 self.__gens[True] = [iso(P) for P in E.gens(use_database=False)]
    1341                 return self.__gens[True]
     1341                try:
     1342                    self.__gens[True] = [iso(P) for P in E.__gens[True]]
     1343                    return self.__gens[True]
     1344                except KeyError: # database curve does not have the gens
     1345                    pass
    13421346            except (RuntimeError, KeyError):  # curve or gens not in database
    13431347                pass
    13441348