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 b from sage.misc.preparser import * 
    2424from sage.misc.preparser import *
    2525from sage.matrix.matrix_space import MatrixSpace
    2626from sage.rings.finite_field import FiniteField as GF
    27 from sage.interfaces.gap import gfq_gap_to_sage as gap_to_sage
     27from sage.interfaces.gap import gfq_gap_to_sage
    2828from sage.groups.perm_gps.permgroup import *
    2929from sage.misc.sage_eval import sage_eval
    3030from sage.misc.misc import prod, add
    def ExtendedQuadraticResidueCode(n,F): 
    9898    gap.eval("G:=GeneratorMat(XC)")
    9999    k = eval(gap.eval("Length(G)"))
    100100    n = eval(gap.eval("Length(G[1])"))
    101     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)]
     101    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)]
    102102    MS = MatrixSpace(F,k,n)
    103103    return LinearCode(MS(G))
    104104