Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fixed broken doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lucas committed Jun 24, 2016
1 parent 46485e6 commit 6d01e05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/doc/en/thematic_tutorials/coding_theory.rst
Expand Up @@ -297,7 +297,7 @@ Let us see how one can explore this::

sage: C = codes.GeneralizedReedSolomonCode(GF(59).list()[:40], 12, GF(59).list()[1:41])
sage: C.encoders_available()
['EvaluationPolynomial', 'EvaluationVector', 'ParityCheck']
['EvaluationPolynomial', 'EvaluationVector']
sage: C.decoders_available()
['Syndrome',
'NearestNeighbor',
Expand Down
9 changes: 4 additions & 5 deletions src/sage/coding/linear_code.py
Expand Up @@ -1910,7 +1910,7 @@ def encode(self, word, encoder_name=None, **kwargs):
It is possible to manually choose the encoder amongst the list of the available ones::
sage: C.encoders_available()
['GeneratorMatrix', 'ParityCheck']
['GeneratorMatrix']
sage: word = vector((0, 1, 1, 0))
sage: C.encode(word, 'GeneratorMatrix')
(1, 1, 0, 0, 1, 1, 0)
Expand Down Expand Up @@ -1963,7 +1963,7 @@ def encoder(self, encoder_name=None, **kwargs):
an exception will be raised::
sage: C.encoders_available()
['GeneratorMatrix', 'ParityCheck']
['GeneratorMatrix']
sage: C.encoder('NonExistingEncoder')
Traceback (most recent call last):
...
Expand Down Expand Up @@ -1992,11 +1992,10 @@ def encoders_available(self, classes=False):
sage: G = Matrix(GF(2), [[1,1,1,0,0,0,0],[1,0,0,1,1,0,0],[0,1,0,1,0,1,0],[1,1,0,1,0,0,1]])
sage: C = LinearCode(G)
sage: C.encoders_available()
['GeneratorMatrix', 'ParityCheck']
['GeneratorMatrix']
sage: C.encoders_available(True)
{'GeneratorMatrix': <class 'sage.coding.linear_code.LinearCodeGeneratorMatrixEncoder'>,
'ParityCheck': <class 'sage.coding.linear_code.LinearCodeParityCheckEncoder'>}
{'GeneratorMatrix': <class 'sage.coding.linear_code.LinearCodeGeneratorMatrixEncoder'>}
"""
if classes == True:
return copy(self._registered_encoders)
Expand Down

0 comments on commit 6d01e05

Please sign in to comment.