[sage-devel] Matrix kernels, plus timing differences

2009-02-07 Thread Rob Beezer
I've posted a couple of times about making some modifications to the code for kernels of matrices. After a lot of thought and a lot of digging around, I've now got several questions that I would appreciate advice on before I jump into making changes. The itch I'm scratching is that I am adding t

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
> > 3. Any singular matrix when inverted should raise a DivisionByZero Error. > > In numpy case this probably means catching an exception to launch a > > different one. Am I right ? > > You mean a ZeroDivisionError, right? Sure !!! It's hard to use several languages at the same time :-). Flor

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread William Stein
On Sat, Feb 7, 2009 at 3:48 PM, Martin Albrecht wrote: > > ... > > Your proposal sounds good. Yes, I also strongly agree with it. I also second Michael's remark that you shouldn't worry at all about volume to this list -- it is meant to be "high volume". There have been on average about 30 me

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Martin Albrecht
... Your proposal sounds good. > 3. Any singular matrix when inverted should raise a DivisionByZero Error. > In numpy case this probably means catching an exception to launch a > different one. Am I right ? You mean a ZeroDivisionError, right? Martin -- name: Martin Albrecht _pgp: http://

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread mabshoff
On Feb 7, 3:37 pm, Florent Hivert wrote: >       Dear William Hi Florent, > Yes... This was perfectly clear to me. And that's why I volunteered to makes > things coherent.   Thanks. It is very important to make all the various classes of Sage more consistent. Some work has been done in tha

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
Dear William > Maybe. I'm not convinced it's better. It's usually good when people > write code, they do > > try: > ... > except (Specific, Tuple, Of, Exceptions): > code > > and *never* > > try: > ... > except: > ... Yes... This was perfectly clear to me. And that's w

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread William Stein
On Sat, Feb 7, 2009 at 2:53 PM, Florent Hivert wrote: > >> For trying to invert a non-square matrix, I think the error should be >> a ValueError, since you're inputing an improper value so that the >> operation is meaningless. >> >> >From http://docs.python.org/library/exceptions.html >> >> excep

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
> For trying to invert a non-square matrix, I think the error should be > a ValueError, since you're inputing an improper value so that the > operation is meaningless. > > >From http://docs.python.org/library/exceptions.html > > exception ValueError > Raised when a built-in operation or func

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread William Stein
On Sat, Feb 7, 2009 at 1:58 PM, Florent Hivert wrote: > > Hi > >> Yes, write code to workaround this case. > > This is mostly done except that on some ring the 0x3 matrix is considered to > be invertible ! And also that the error messages are inconsistent: some raise > a ValueError some rais

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
Hi > Yes, write code to workaround this case. This is mostly done except that on some ring the 0x3 matrix is considered to be invertible ! And also that the error messages are inconsistent: some raise a ValueError some raise an ArithmeticError, some says "self must be a square matrix" some

[sage-devel] Re: Sage Days 12 Final Report Summary

2009-02-07 Thread mabshoff
On Feb 7, 9:16 am, Ronan Paixão wrote: > I respect your opinions and actually I just wanted to post mine. Surely > I don't have the skills even to start such a great venture as porting a > zillion apps to work on Windows. Actually, I don't really intend it to > use Cygwin or whatever wrapper

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread William Stein
Yes, write code to workaround this case. On 2/7/09, Florent Hivert wrote: > > On Sat, Feb 07, 2009 at 03:22:51PM +, Martin Albrecht wrote: >> >> > One community question : suppose that this happen and that I don't >> > find the correct way to fix it (no one knows about strange data >> > st

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
On Sat, Feb 07, 2009 at 03:22:51PM +, Martin Albrecht wrote: > > > One community question : suppose that this happen and that I don't > > find the correct way to fix it (no one knows about strange data structure > > :-)) is this ok to post a patch that test the problem and raise a doc error >

[sage-devel] Re: Paul Zimmermann's talk on wiki

2009-02-07 Thread Ronan Paixão
Em Sáb, 2009-02-07 às 11:52 +1100, Minh Nguyen escreveu: > Hi folks, > > Paul Zimmermann delivered a talk on Sage on 2009-01-19. This > information has been added to the Sage talks wiki at > > http://wiki.sagemath.org/Talks > > Thank you, Paul, for your effort in spreading the word about Sage.

[sage-devel] Re: Sage Days 12 Final Report Summary

2009-02-07 Thread Ronan Paixão
Em Sex, 2009-02-06 às 12:59 -0800, mabshoff escreveu: > > > On Feb 6, 9:53 am, Ronan Paixão wrote: > > Em Ter, 2009-01-27 às 06:13 -0800, mabshoff escreveu: > > > > Hi Ronan, > > > I'm against all that SUA stuff. I completely agree it's a great help to > > get sage running on Windows, but t

[sage-devel] Re: error in calulations, big numbers, etc...

2009-02-07 Thread Ronan Paixão
Em Sex, 2009-02-06 às 22:18 +0200, ahmet alper parker escreveu: > One more comment on the subject. As we were trying to solve a > Sturm-Lioville boundary value problem by finite difference method, we > calculated eigenvalues and eigenvectors of some matrices on matlab and > mathematica. In both of

[sage-devel] error installing gnuplot

2009-02-07 Thread Patrick E. Dorey
Hi, I'm getting the following error when attempting to add gnuplot to sage by typing sage -i gnuplot-4.0.0 when in /Applications/sage> : > gplt_x11.c:519: error: 'Class ' redeclared as different kind of > symbol > :0: error: previous declaration of 'Class ' was here > make[3]: *** [gplt_x11.o

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
Sorry for the previous mail !!! I didn't paste everything I meant to. > > I certainly want to be able to create 0x0 matrices, and would insist > > that the determinant is 1. So it seems consistent to say that such a > > matrix is invertible; and then there isn't much choice for the > > inverse!

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
Dear John Cremona, > I certainly want to be able to create 0x0 matrices, and would insist > that the determinant is 1. So it seems consistent to say that such a > matrix is invertible; and then there isn't much choice for the > inverse! Agreed !!! The following current behavior is indeed

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Martin Albrecht
> One community question : suppose that this happen and that I don't > find the correct way to fix it (no one knows about strange data structure > :-)) is this ok to post a patch that test the problem and raise a doc error > and to add a trac ticket for this specific problem ? I'd say: Don't rais

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread John Cremona
I certainly want to be able to create 0x0 matrices, and would insist that the determinant is 1. So it seems consistent to say that such a matrix is invertible; and then there isn't much choice for the inverse! John 2009/2/7 Florent Hivert : > > Dear Martin Albrecht, > > Thanks for your qui

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
Dear Martin Albrecht, Thanks for your quick answer. > > So my question is the following: is there a specific reason why this test > > has been written ? > > I wrote that doctest, because that behaviour is consistent with other > matrices. > > sage: A = random_matrix(GF(127),0,0)

[sage-devel] Re: The empty matrix is invertible ?

2009-02-07 Thread Martin Albrecht
On Saturday 07 February 2009, Florent Hivert wrote: > Dear All, > >I'm preparing a patch which allows one to use generic_power (computing > a^n) for monoids and even semi groups. So I had to change the handling of > particular cases (a=0 or n=0). After this change all tests passes except

[sage-devel] The empty matrix is invertible ?

2009-02-07 Thread Florent Hivert
Dear All, I'm preparing a patch which allows one to use generic_power (computing a^n) for monoids and even semi groups. So I had to change the handling of particular cases (a=0 or n=0). After this change all tests passes except for one in matrix_mod2_dense: **