also all the existing examples in the source code gave the same results, if we have more we can test them I suppose
On Tuesday, February 18, 2014 2:07:53 PM UTC-5, Martin R. Albrecht wrote: > > Looks like a bug to me, i.e. the mod2 submatrix command should assume > default parameters when less than four parameters are given. > > I am happy to review your patch ;) > > On 18/02/14 18:38, [email protected] <javascript:> wrote: > > I'm trying to compute some homology stuff by finding the smith normal > > form of (fairly) large matrices. > > > > I do the following: > > > > A = Matrix(IntegerModRing(2),[[1,0,2],[1,0,1]]) A.smith_form() > > > > and I get the following error: > > > > TypeError Traceback (most recent call > > last) <ipython-input-6-23e95c6be019> in <module>() ----> 1 > > A.smith_form() > > > > > /Users/.../builds/sage-6.1.1/local/lib/python2.7/site-packages/sage/matrix/matrix2.so > > > > in sage.matrix.matrix2.Matrix.smith_form > > (sage/matrix/matrix2.c:60007)() > > > > > /Users/.../builds/sage-6.1.1/local/lib/python2.7/site-packages/sage/matrix/matrix_mod2_dense.so > > > > in sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.submatrix > > (sage/matrix/matrix_mod2_dense.c:10429)() > > > > TypeError: submatrix() takes exactly 4 positional arguments (2 > > given) > > > > Looking at the code, line 12413 (mm = t.submatrix(1,1) ) only passes > > two arguments while the actual sub matrix function takes 5 arguments > > (itself, which doesn't count, lowr, lowc, nrows, ncols). > > > > Since the integers mod 2 are a field, this "should" be working in > > theory. The integers mod 3 and the integers both work. Any thoughts? > > > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.
