#1651 closed defect (fixed)
[with bundle, with positive review] bug in decode
Reported by: | David Joyner | Owned by: | David Joyner |
---|---|---|---|
Priority: | minor | Milestone: | sage-2.10.2 |
Component: | coding theory | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Reported by Harald Schilly:
Here what I've tried (documentation does it a bit more "difficult", but should be the same -- at least I hope so) http://www.sagemath.org/doc/html/const/node37.html
C = HammingCode?(2,GF(5)) v = matrix(GF(5),1,0,0,2,1,0?) C.decode(v)
works (at least no errors), but
v = vector(GF(5),[1,0,0,2,1,0]) C.decode(v)
says:
TypeError?: Gap produced error output Permutation: <expr> must be a positive integer (not a integer) executing $sage333:=(1, 0, 0, 2, 1, 0);;
I can see the different braces in the output, but internally a 1xn/nx1 matrix should handled in some way the same as a vector.
Attachments (3)
Change History (11)
comment:1 Changed 15 years ago by
Changed 15 years ago by
Attachment: | linear_code20080102.hg added |
---|
patch for bug fix of decode in linear_code.py
comment:2 Changed 15 years ago by
Summary: | bug in decode → [with bundle, needs review] bug in decode |
---|
Changed 15 years ago by
Attachment: | 1651-doctest.patch added |
---|
comment:3 Changed 15 years ago by
Summary: | [with bundle, needs review] bug in decode → [with bundle, with mostly positive review] bug in decode |
---|
Seems reasonable, I say apply. The formatting on the 1651-doctest patch is not the best, and I don't think the docstring to decode() is clear about what the acceptable inputs are.
Changed 15 years ago by
Attachment: | linear_code20080127.hg added |
---|
comment:4 Changed 15 years ago by
I added an attachment which includes (1) my fix of the H Schilly bug, (2) M Hansen's docstring addition (reformatted, as the referee suggested), (3) an additional doctest (as suggested by the referee).
comment:5 Changed 15 years ago by
Could we get somebody to review this updated patch?
Cheers,
Michael
comment:6 Changed 15 years ago by
Summary: | [with bundle, with mostly positive review] bug in decode → [with bundle, with positive review] bug in decode |
---|
Thumbs up from me!
comment:7 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Merged linear_code20080127.hg in Sage 2.10.2.alpha0
I fixed this bug. The patch is at http://sage.math.washington.edu/home/wdj/patches/linear-codes20071210.hg It passes sage -t.