#1651 closed defect (fixed)
[with bundle, with positive review] bug in decode
Reported by: | wdj | Owned by: | wdj |
---|---|---|---|
Priority: | minor | Milestone: | sage-2.10.2 |
Component: | coding theory | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | 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 12 years ago by
comment:2 Changed 12 years ago by
- Summary changed from bug in decode to [with bundle, needs review] bug in decode
Changed 12 years ago by
comment:3 Changed 12 years ago by
- Summary changed from [with bundle, needs review] bug in decode to [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 12 years ago by
comment:4 Changed 12 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 12 years ago by
Could we get somebody to review this updated patch?
Cheers,
Michael
comment:6 Changed 12 years ago by
- Summary changed from [with bundle, with mostly positive review] bug in decode to [with bundle, with positive review] bug in decode
Thumbs up from me!
comment:7 Changed 12 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged linear_code20080127.hg in Sage 2.10.2.alpha0
comment:8 Changed 12 years ago by
Arrg, it was actually merged in Sage 2.10.2.alpha1
I fixed this bug. The patch is at http://sage.math.washington.edu/home/wdj/patches/linear-codes20071210.hg It passes sage -t.