Smith form [bug?]

52 views
Skip to first unread message

dsch...@gmail.com

unread,
Apr 27, 2012, 6:44:00 AM4/27/12
to sage-s...@googlegroups.com
Today I was just doing some college work and I found an error computing the Smith form of a Matrix (over GF(2)).


sage: AA = matrix(Zmod(2), [[1,1], [1,0], [0,1]])
sage: AA.smith_form()

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_100.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("QUEuc21pdGhfZm9ybSgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>

File "/tmp/tmpXWhShB/___code___.py", line 2, in <module>
exec compile(u'AA.smith_form()
File "", line 1, in <module>

File "matrix2.pyx", line 10512, in sage.matrix.matrix2.Matrix.smith_form (sage/matrix/matrix2.c:49285)
File "matrix_mod2_dense.pyx", line 1666, in sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.submatrix (sage/matrix/matrix_mod2_dense.c:9696)
TypeError: submatrix() takes exactly 4 positional arguments (2 given)


When I looked at the code, it seemed that "Matrix Mod2" submatrix doesn't have the parameters "nrows , ncols" as optional (like the "Matrix" submatrix method).

(If necessary: I have Sage 4.8.0 installed in Ubuntu 12.04 (32 bits)).

Martin Albrecht

unread,
Apr 27, 2012, 6:49:37 AM4/27/12
to sage-s...@googlegroups.com
Looks like a bug, can you open a ticket and perhaps post a patch? I can review
it.
Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de

dsch...@gmail.com

unread,
Apr 27, 2012, 10:26:55 AM4/27/12
to sage-s...@googlegroups.com

Hi,

I have just opened one:

http://trac.sagemath.org/sage_trac/ticket/12887


El viernes, 27 de abril de 2012 12:49:37 UTC+2, Martin Albrecht escribió:
Looks like a bug, can you open a ticket and perhaps post a patch? I can review
it.

Reply all
Reply to author
Forward
0 new messages