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)).
Looks like a bug, can you open a ticket and perhaps post a patch? I can review
it.