det() is called when inverting matrix through GE

5 views
Skip to first unread message

Bryan

unread,
Sep 5, 2011, 4:32:14 PM9/5/11
to sympy
Hi all.

When inverting a matrix through gaussian elimination, the det() method
is called,
which kills the performance and I think makes little sense as having
calculated the
det allows other ways of inverting the matrix and because there are
other ways of
noticing if the matrix is non-invertible through gaussian elimination.

Also, it is dying on me due to some error (cannot elevate polynomial
to negative power),
but I know that the matrix is invertible.

Is there any good reason to call det() there?

Regards

Bryan

Aaron Meurer

unread,
Sep 6, 2011, 12:27:25 PM9/6/11
to sy...@googlegroups.com
Hi.

If you look at the source, it's only being called to see if the matrix
is invertible. But this is unnecessary, because it can just check the
form of the output of rref to determine this. Can you open an issue
for this? Or, you could send in a patch. This should be quite easy
to fix.

On Mon, Sep 5, 2011 at 2:32 PM, Bryan <alk...@gmail.com> wrote:
> Hi all.
>
> When inverting a matrix through gaussian elimination, the det() method
> is called,
> which kills the performance and I think makes little sense as having
> calculated the
> det allows other ways of inverting the matrix and because there are
> other ways of
> noticing if the matrix is non-invertible through gaussian elimination.
>
> Also, it is dying on me due to some error (cannot elevate polynomial
> to negative power),
> but I know that the matrix is invertible.

This is probably a separate error. What Matrix gives you this error?
Can you open a (separate) issue for this?

Aaron Meurer

>
> Is there any good reason to call det() there?
>
> Regards
>
> Bryan
>

> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>
>

Aaron Meurer

unread,
Sep 11, 2011, 3:51:07 PM9/11/11
to sy...@googlegroups.com
I opened http://code.google.com/p/sympy/issues/detail?id=2683 for the
det() issue. I don't know how to reproduce your other problem, so I
can't open any issues for that.

Aaron Meurer

Bryan

unread,
Sep 13, 2011, 5:37:19 PM9/13/11
to sympy
Thank you very much Aaron,
I am sorry I didnt respond quickly, I just changed
continents.


I will try to submit a patch on the issue, as soon
as I understand how to do it.

Regarding the other problem I am trying to isolate
it, but it will take a while, as I have to gain
access to my former computer.

Regards

Bryan

Aaron Meurer

unread,
Sep 13, 2011, 7:01:19 PM9/13/11
to sy...@googlegroups.com
On Tue, Sep 13, 2011 at 3:37 PM, Bryan <alk...@gmail.com> wrote:
> Thank you very much Aaron,
> I am sorry I didnt respond quickly, I just changed
> continents.
>
>
> I will try to submit a patch on the issue, as soon
> as I understand how to do it.

Great. If you need assistance on submitting a patch, feel free to ask
here. You question is likely answered in our guide, too, at
https://github.com/sympy/sympy/wiki/development-workflow.

Aaron Meurer

>
> Regarding the other problem I am trying to isolate
> it, but it will take a while, as I have to gain
> access to my former computer.
>
> Regards
>
> Bryan
>

Reply all
Reply to author
Forward
0 new messages