# HG changeset patch
# User David Roe
# Date 1327971260 28800
# Node ID 6401865dc6c972df556c65f703b0f002ab16e524
# Parent 2b0c676f530d297aede555b6524fe3940fdbadc1
#12397: Change doctests to remove trailing backslashes
diff --git a/sage/categories/classical_crystals.py b/sage/categories/classical_crystals.py
--- a/sage/categories/classical_crystals.py
+++ b/sage/categories/classical_crystals.py
@@ -324,14 +324,14 @@
sage: fb4 = lambda a,b,c,d: CrystalOfTableaux(['B',4],shape=[a+b+c+d,b+c+d,c+d,d])
sage: fd4 = lambda a,b,c,d: CrystalOfTableaux(['D',4],shape=[a+b+c+d,b+c+d,c+d,d])
sage: fd5 = lambda a,b,c,d,e: CrystalOfTableaux(['D',5],shape=[a+b+c+d+e,b+c+d+e,c+d+e,d+e,e])
- sage: def fd4spinplus(a,b,c,d):\
- C = CrystalOfTableaux(['D',4],shape=[a+b+c+d,b+c+d,c+d,d]);\
- D = CrystalOfSpinsPlus(['D',4]);\
- return TensorProductOfCrystals(C,D,generators=[[C[0],D[0]]])
- sage: def fb3spin(a,b,c):\
- C = CrystalOfTableaux(['B',3],shape=[a+b+c,b+c,c]);\
- D = CrystalOfSpins(['B',3]);\
- return TensorProductOfCrystals(C,D,generators=[[C[0],D[0]]])
+ sage: def fd4spinplus(a,b,c,d):
+ ... C = CrystalOfTableaux(['D',4],shape=[a+b+c+d,b+c+d,c+d,d])
+ ... D = CrystalOfSpinsPlus(['D',4])
+ ... return TensorProductOfCrystals(C,D,generators=[[C[0],D[0]]])
+ sage: def fb3spin(a,b,c):
+ ... C = CrystalOfTableaux(['B',3],shape=[a+b+c,b+c,c])
+ ... D = CrystalOfSpins(['B',3])
+ ... return TensorProductOfCrystals(C,D,generators=[[C[0],D[0]]])
TODO: choose a good panel of values for a,b,c ... both for
basic systematic tests and for conditionally run,
diff --git a/sage/coding/binary_code.pyx b/sage/coding/binary_code.pyx
--- a/sage/coding/binary_code.pyx
+++ b/sage/coding/binary_code.pyx
@@ -81,29 +81,29 @@
EXAMPLES:
sage: from sage.coding.binary_code import weight_dist
- sage: M = Matrix(GF(2),[\
- ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],\
- ... [0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],\
- ... [0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1],\
- ... [0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1],\
+ sage: M = Matrix(GF(2),[
+ ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],
+ ... [0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],
+ ... [0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1],
+ ... [0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1],
... [0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]])
sage: weight_dist(M)
[1, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 1]
- sage: M = Matrix(GF(2),[\
- ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],\
- ... [0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0],\
- ... [0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,1,1],\
+ sage: M = Matrix(GF(2),[
+ ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],
+ ... [0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0],
+ ... [0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,1,1],
... [0,0,0,1,1,0,0,0,0,1,1,0,1,1,0,1,1]])
sage: weight_dist(M)
[1, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 4, 0, 0, 0, 0, 0]
- sage: M=Matrix(GF(2),[\
- ... [1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0],\
- ... [0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0],\
- ... [0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0],\
- ... [0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0],\
- ... [0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0],\
- ... [0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0],\
- ... [0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0],\
+ sage: M=Matrix(GF(2),[
+ ... [1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0],
+ ... [0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0],
+ ... [0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0],
+ ... [0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0],
+ ... [0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0],
+ ... [0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0],
+ ... [0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0],
... [0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1]])
sage: weight_dist(M)
[1, 0, 0, 0, 0, 0, 68, 0, 85, 0, 68, 0, 34, 0, 0, 0, 0, 0]
@@ -3074,11 +3074,11 @@
sage: from sage.coding.binary_code import *
sage: BC = BinaryCodeClassifier()
- sage: M = Matrix(GF(2),[\
- ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],\
- ... [0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],\
- ... [0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1],\
- ... [0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1],\
+ sage: M = Matrix(GF(2),[
+ ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],
+ ... [0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],
+ ... [0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1],
+ ... [0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1],
... [0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1]])
sage: B = BinaryCode(M)
sage: gens, labeling, size, base = BC._aut_gp_and_can_label(B)
@@ -3089,10 +3089,10 @@
sage: size
322560
- sage: M = Matrix(GF(2),[\
- ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],\
- ... [0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0],\
- ... [0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,1,1],\
+ sage: M = Matrix(GF(2),[
+ ... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],
+ ... [0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0],
+ ... [0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,1,1],
... [0,0,0,1,1,0,0,0,0,1,1,0,1,1,0,1,1]])
sage: B = BinaryCode(M)
sage: gens, labeling, size, base = BC._aut_gp_and_can_label(B)
@@ -3103,14 +3103,14 @@
sage: size
2304
- sage: M=Matrix(GF(2),[\
- ... [1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0],\
- ... [0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0],\
- ... [0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0],\
- ... [0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0],\
- ... [0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0],\
- ... [0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0],\
- ... [0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0],\
+ sage: M=Matrix(GF(2),[
+ ... [1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0,0],
+ ... [0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0,0],
+ ... [0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0,0],
+ ... [0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0,0],
+ ... [0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0,0],
+ ... [0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0,0],
+ ... [0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1,0],
... [0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1]])
sage: B = BinaryCode(M)
sage: gens, labeling, size, base = BC._aut_gp_and_can_label(B)
@@ -3121,17 +3121,17 @@
sage: size
136
- sage: M=Matrix(GF(2),[\
- ... [0,1,0,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,0,1],\
- ... [1,0,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0],\
- ... [0,1,1,1,0,0,0,1,0,0,1,1,0,0,0,1,1,1,0,1,0,0],\
- ... [1,1,1,0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1,0,0,1],\
- ... [1,1,0,0,0,1,0,0,1,0,1,0,0,1,1,1,0,1,0,0,1,0],\
- ... [1,0,0,0,1,0,0,1,0,1,1,0,1,1,1,0,1,0,0,1,0,0],\
- ... [0,0,0,1,0,0,1,0,1,1,1,1,1,1,0,1,0,0,1,0,0,0],\
- ... [0,0,1,0,0,1,0,1,1,1,0,1,1,0,1,0,0,1,0,0,0,1],\
- ... [0,1,0,0,1,0,1,1,1,0,0,1,0,1,0,0,1,0,0,0,1,1],\
- ... [1,0,0,1,0,1,1,1,0,0,0,0,1,0,0,1,0,0,0,1,1,1],\
+ sage: M=Matrix(GF(2),[
+ ... [0,1,0,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,0,1],
+ ... [1,0,1,1,1,0,0,0,1,0,0,0,1,0,0,0,1,1,1,0,1,0],
+ ... [0,1,1,1,0,0,0,1,0,0,1,1,0,0,0,1,1,1,0,1,0,0],
+ ... [1,1,1,0,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1,0,0,1],
+ ... [1,1,0,0,0,1,0,0,1,0,1,0,0,1,1,1,0,1,0,0,1,0],
+ ... [1,0,0,0,1,0,0,1,0,1,1,0,1,1,1,0,1,0,0,1,0,0],
+ ... [0,0,0,1,0,0,1,0,1,1,1,1,1,1,0,1,0,0,1,0,0,0],
+ ... [0,0,1,0,0,1,0,1,1,1,0,1,1,0,1,0,0,1,0,0,0,1],
+ ... [0,1,0,0,1,0,1,1,1,0,0,1,0,1,0,0,1,0,0,0,1,1],
+ ... [1,0,0,1,0,1,1,1,0,0,0,0,1,0,0,1,0,0,0,1,1,1],
... [0,0,1,0,1,1,1,0,0,0,1,1,0,0,1,0,0,0,1,1,1,0]])
sage: B = BinaryCode(M)
sage: gens, labeling, size, base = BC._aut_gp_and_can_label(B)
@@ -3155,7 +3155,7 @@
sage: size
87178291200
- sage: M = Matrix(GF(2),[\
+ sage: M = Matrix(GF(2),[
... [1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0],
... [0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0],
... [0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,1,1,1],
@@ -3166,7 +3166,7 @@
sage: BC._aut_gp_and_can_label(B)[2]
2160
- sage: M = Matrix(GF(2),[\
+ sage: M = Matrix(GF(2),[
... [1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
... [0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
... [0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],
@@ -3181,7 +3181,7 @@
sage: BC._aut_gp_and_can_label(B)[2]
294912
- sage: M = Matrix(GF(2), [\
+ sage: M = Matrix(GF(2), [
... [1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
... [0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
... [0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0],