mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-18 10:19:03 -04:00
86 lines
3.5 KiB
Diff
86 lines
3.5 KiB
Diff
diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
|
|
--- src/sage/databases/cremona.py.orig 2015-04-03 15:06:14.304399023 -0300
|
|
+++ src/sage/databases/cremona.py 2015-04-03 15:06:26.792399501 -0300
|
|
@@ -820,14 +820,9 @@ class MiniCremonaDatabase(SQLDatabase):
|
|
if N < self.largest_conductor():
|
|
message = "There is no elliptic curve with label " + label \
|
|
+ " in the database"
|
|
- elif is_package_installed('database_cremona_ellcurve'):
|
|
- message = "There is no elliptic curve with label " + label \
|
|
- + " in the currently available databases"
|
|
else:
|
|
message = "There is no elliptic curve with label " \
|
|
- + label + " in the default database; try installing " \
|
|
- + "the optional package database_cremona_ellcurve which " \
|
|
- + "contains the complete Cremona database"
|
|
+ + label + " in the default database"
|
|
raise ValueError(message)
|
|
ainvs = eval(c[0])
|
|
data = {'cremona_label': label,
|
|
@@ -1670,10 +1665,12 @@ def CremonaDatabase(name=None,mini=None,
|
|
if name is None and not set_global:
|
|
return _db
|
|
if set_global and name is None:
|
|
- if is_package_installed('database_cremona_ellcurve'):
|
|
- name = 'cremona'
|
|
- else:
|
|
- name = 'cremona mini'
|
|
+ # currently the sagemath rpm package only installs cremona mini
|
|
+ #if is_package_installed('database_cremona_ellcurve'):
|
|
+ # name = 'cremona'
|
|
+ #else:
|
|
+ # name = 'cremona mini'
|
|
+ name = 'cremona mini'
|
|
if name == 'cremona':
|
|
mini = False
|
|
elif name == 'cremona mini':
|
|
diff -up src/sage/libs/cremona/mat.pxd.orig src/sage/libs/cremona/mat.pxd
|
|
--- src/sage/libs/cremona/mat.pxd.orig 2015-02-16 17:15:10.000000000 -0700
|
|
+++ src/sage/libs/cremona/mat.pxd 2015-07-26 07:34:43.000000000 -0600
|
|
@@ -13,11 +13,13 @@ cdef extern from "eclib/homspace.h":
|
|
ctypedef struct mat "mat":
|
|
scalar* get_entries() # TODO: possibly not int --
|
|
scalar sub(long,long)
|
|
+ # These became methods from eclib-20150228:
|
|
+ long nrows()
|
|
+ long ncols()
|
|
+ long rank()
|
|
|
|
- long nrows(mat M)
|
|
- long ncols(mat M)
|
|
mat addscalar(mat M, scalar)
|
|
- long rank(mat M)
|
|
+
|
|
|
|
# Constructors
|
|
mat *new_mat "new mat" (mat m)
|
|
diff -up src/sage/libs/cremona/mat.pyx.orig src/sage/libs/cremona/mat.pyx
|
|
--- src/sage/libs/cremona/mat.pyx.orig 2015-02-16 17:15:10.000000000 -0700
|
|
+++ src/sage/libs/cremona/mat.pyx 2015-09-25 15:16:01.212387267 -0600
|
|
@@ -98,7 +98,7 @@ cdef class Matrix:
|
|
cdef long i, j
|
|
if self.M:
|
|
i, j = ij
|
|
- if 0<i and i<=nrows(self.M[0]) and 0<j and j<=ncols(self.M[0]):
|
|
+ if 0<i and i<=self.M[0].nrows() and 0<j and j<=self.M[0].ncols():
|
|
return self.M.sub(i,j)
|
|
raise IndexError, "matrix indices out of range"
|
|
raise IndexError, "cannot index into an undefined matrix"
|
|
@@ -115,7 +115,7 @@ cdef class Matrix:
|
|
sage: t.nrows()
|
|
2
|
|
"""
|
|
- return nrows(self.M[0])
|
|
+ return self.M[0].nrows()
|
|
|
|
def ncols(self):
|
|
"""
|
|
@@ -129,7 +129,7 @@ cdef class Matrix:
|
|
sage: M.dimension()
|
|
156
|
|
"""
|
|
- return ncols(self.M[0])
|
|
+ return self.M[0].ncols()
|
|
|
|
# Commented out since it gives very weird
|
|
# results when sign != 0.
|