#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.3
      Component:  linear algebra     |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Darij Grinberg     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/combinat/matrix0-fix        |  f36f0ad401050a0ea824acd75be32d92c0b832c1
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Old description:

> Just a couple small fixes, the one in the summary being the main one.
> (Not all rings R have their zero element equal to R(0).)

New description:

 This branch does a couple small improvements to
 `src/sage/matrix/matrix0.pyx`, the most important one being a replacement
 of "== 0" by "== zero" since there are rings R whose zero element is not
 the same as R(0). (Two grammar errors in the doc are also fixed.)

--

Comment (by darij):

 Oops, the use of "not" was a relic of the old version.

 Part of the reason why comparison with parent().zero() takes so long is
 that parent() and zero() have to be computed. This can be done once per
 call of the method, and so the time amortizes quite well.
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=f36f0ad401050a0ea824acd75be32d92c0b832c1
 f36f0ad]||{{{use != instead of not ==}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/16306#comment:14>
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.

Reply via email to