Thanks for the patch; great job.  I've moved the 0 examples
to a TESTS section.

 --William

On 6/2/07, Michel <[EMAIL PROTECTED]> wrote:
>
> Here is a patch that fixes this. Perhaps there is a better way to do
> it.
>
> http://emis.uhasselt.be/sage_patches/zero_matrix_echelon_form_bug.patch
>
> Michel
>
>
> On Jun 2, 10:01 am, Michel <[EMAIL PROTECTED]> wrote:
> > Ok I understand!!
> >
> > I just did the exercise in the pari console.
> >
> > ? A=[0,0,0; 0,0,0;  0,0,0]
> > %3 =
> > [0 0 0]
> >
> > [0 0 0]
> >
> > [0 0 0]
> >
> > ? mathnf(A)
> > %4 = [;]
> >
> > So pari is a bit brain damaged and represents the empty matrix by
> > [;]!!!
> > This should be special cased in the parsing routines.
> >
> > William: I assume it is now trivial for you to correct this. If not
> > then
> > I will make a patch.
> >
> > Michel
> >
> > On Jun 2, 9:54 am, Michel <[EMAIL PROTECTED]> wrote:
> >
> > > It's quite confusing where this bug lies. I would assume that
> >
> > > sage.libs.pari.gen.gen.mathnf
> >
> > > returns the wrong thing but since I can't find the definition
> > > of new_gen I can't debug it further.
> >
> > > Michel
> >
> > > On Jun 1, 10:55 pm, Michel <[EMAIL PROTECTED]> wrote:
> >
> > > > No patch but I can tell you were there is something obviously wrong.
> >
> > > > The matrix H on line 1056 in matrix_integer_dense.pyx should
> > > > be the empty matrix (perhaps []?) but it is something like ['',''].
> > > > The computation
> > > > for adding the missing zero rows goes wrong after that.
> >
> > > > Michel
> >
> > > > On Jun 1, 9:34 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> >
> > > > > On 6/1/07, Thea Gegenberg <[EMAIL PROTECTED]> wrote:
> >
> > > > > > The method echelon_form gives me an error when I try to take the
> > > > > > echelon form of a zero matrix. It says "TypeError: entries has the
> > > > > > wrong length"
> >
> > > > > Here's an example to illustrate the bug.  I hope somebody will
> > > > > fix it and send me a patch :-).
> >
> > > > > sage: m = matrix(ZZ,3,3,[0]*9)
> > > > > sage: m.ech
> > > > > m.echelon_form  m.echelonize
> > > > > sage: m.echelon()
> > > > > ---------------------------------------------------------------------------
> > > > > <type 'exceptions.AttributeError'>        Traceback (most recent call 
> > > > > last)
> >
> > > > > /home/was/talks/2007-06-01-grants/<ipython console> in <module>()
> >
> > > > > <type 'exceptions.AttributeError'>:
> > > > > 'sage.matrix.matrix_integer_dense.Matrix_integer_de' object has no
> > > > > attribute 'echelon'
> > > > > sage: m.echelon_form()
> > > > > ---------------------------------------------------------------------------
> > > > > <type 'exceptions.TypeError'>
>
>
> >
>


-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://www.williamstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to