#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 darij):
1) I don't have good examples. We have semirings where 0 is not the zero
in Sage (try `TropicalSemiring(ZZ)`), but this particular method doesn't
make much sense for these. This is more an issue of principle: We might
eventually get rings like Grothendieck's lambda-rings (the ring of power
series over a given ring K, with multiplication of power series as
addition, and a weirder multiplication -- and, before you ask, there are
finite-dimensional quotients of this, so it's not all lazy power series,
so testing for zeroness does make sense), on which there will suddenly be
a lot of failing code due to the fact that the coerce of 1 (not the coerce
of 0) is the zero element.
2) I don't know. I wouldn't make an assumption on the boolean coerce of a
ring element. But maybe I could...
--
Ticket URL: <http://trac.sagemath.org/ticket/16306#comment:4>
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.