#16306: Replace =0 by is_zero() in test for matrix being alternating
-------------------------------------+-------------------------------------
Reporter: darij | Owner:
Type: defect | Status: needs_review
Priority: trivial | Milestone: sage-6.2
Component: linear algebra | Resolution:
Keywords: | Merged in:
Authors: Darij Grinberg | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/combinat/matrix0-fix | 4d4cbe0664c62dce9780d82e8eb948ee420ce521
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Hi Darij,
1) Could you provide examples of rings for which the test fails? It is not
clear to me why we need this and if you do not want that such bug
reproduces you need to test it. More precisely, in the documentation write
something along the lines of
{{{
In the following example, we show that we solve the issue in :trac:`16306`
is solved::
sage: a_nice_example()
Hey!
}}}
2) why not
{{{
- if self.get_unsafe(i,i) != 0:
+ if not self.get_unsafe(i,i):
}}}
Do we know that `__nonzero__` always does what we expect?
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/16306#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/d/optout.