Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CremonaDatabase().number_of_curves() should work when the optional database isn't installed. #4755

Closed
mwhansen opened this issue Dec 11, 2008 · 4 comments
Assignees
Milestone

Comments

@mwhansen
Copy link
Contributor

sage: CremonaDatabase().number_of_curves()
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)

/home/mike/.sage/temp/mike_laptop/12400/_home_mike__sage_init_sage_0.py in <module>()
----> 1 
      2 
      3 
      4 
      5 

/opt/sage/local/lib/python2.5/site-packages/sage/databases/cremona.pyc in number_of_curves(self, N, i)
    680         """
    681         if N == 0:
--> 682             return self['number_of_curves']
    683         C = self.allcurves(N)
    684         if i == 0:

/opt/sage/local/lib/python2.5/site-packages/sage/databases/cremona.pyc in __getitem__(self, N)
    345         if isinstance(N, str) and len(N) > 0:
    346             if N[0].isalpha():
--> 347                 return sage.databases.db.Database.__getitem__(self, N)
    348             else:
    349                 return self.elliptic_curve(N)

/opt/sage/local/lib/python2.5/site-packages/sage/databases/db.pyc in __getitem__(self, x)
    258         try:
    259             if not isinstance(x, slice):
--> 260                 return self.root[x]
    261             return [self[k] for k in range(x.start, x.stop, x.step)]
    262         except AttributeError:

KeyError: 'number_of_curves'

Component: misc

Issue created by migration from https://trac.sagemath.org/ticket/4755

@aghitza
Copy link

aghitza commented Jan 23, 2009

comment:1

Same issue with number_of_isogeny_classes().

@aghitza
Copy link

aghitza commented Jan 23, 2009

comment:2

The attached patch fixes the two issues, as well as a number of smaller issues that I noticed while looking through cremona.py.

@robertwb
Copy link
Contributor

comment:3

Attachment: trac_4755.patch.gz

Looks and works good for me. Lots of other documentation and other typo fixes too.

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 24, 2009

comment:4

Merged in Sage 3.3.alpha2.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin modified the milestones: sage-3.4.1, sage-3.3 Jan 24, 2009
@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Jan 24, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants