mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 19:55:54 -04:00
Adapt to changed eclib interface.
This commit is contained in:
parent
4a9ef37508
commit
7c9edb5212
1 changed files with 50 additions and 0 deletions
|
@ -34,3 +34,53 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py
|
||||||
if name == 'cremona':
|
if name == 'cremona':
|
||||||
mini = False
|
mini = False
|
||||||
elif name == 'cremona mini':
|
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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue