Ticket #1810: guava_fix.patch

File guava_fix.patch, 1.3 KB (added by Martin Albrecht, 15 years ago)
• sage/coding/guava.py

```# HG changeset patch
# User 'Martin Albrecht <malb@informatik.uni-bremen.de>'
# Date 1204160994 28800
# Node ID 7b89f68f8ab99b6dea12936ddce789ef04cadc2b
# Parent  b46bbe2dff171a8217d1ef62b1d2e85076c2c9de
fix doctest failure

diff -r b46bbe2dff17 -r 7b89f68f8ab9 sage/coding/guava.py```
 a from sage.misc.preparser import * from sage.misc.preparser import * from sage.matrix.matrix_space import MatrixSpace from sage.rings.finite_field import FiniteField as GF from sage.interfaces.gap import gfq_gap_to_sage as gap_to_sage from sage.interfaces.gap import gfq_gap_to_sage from sage.groups.perm_gps.permgroup import * from sage.misc.sage_eval import sage_eval from sage.misc.misc import prod, add def ExtendedQuadraticResidueCode(n,F): gap.eval("G:=GeneratorMat(XC)") k = eval(gap.eval("Length(G)")) n = eval(gap.eval("Length(G[1])")) G = [[gap_to_sage(gap.eval("G["+str(i)+"]["+str(j)+"]"),F) for j in range(1,n+1)] for i in range(1,k+1)] G = [[gfq_gap_to_sage(gap.eval("G["+str(i)+"]["+str(j)+"]"),F) for j in range(1,n+1)] for i in range(1,k+1)] MS = MatrixSpace(F,k,n) return LinearCode(MS(G))