#17663: Clean up sparse matrices
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  vdelecroix             |       Status:  needs_review
           Type:         |    Milestone:  sage-6.5
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:  Martin von Gagern
  linear algebra         |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  d292e6ff17ea1815e5b24267a6d0140ea5598add
  Vincent Delecroix      |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/17663           |
   Dependencies:         |
  #17658                 |
-------------------------+-------------------------------------------------

Comment (by gagern):

 Replying to [comment:19 vdelecroix]:
 > It depends on the school! "my_var is None" is a simple address lookup
 while "not my_var" implies a function call. So "my_var is None" is very
 fast compared to "not my_var".

 Valid point, so I won't object to leave the code as it is. Might even
 adapt that style.

 > > * `_cmp_backward` might use `if i != j: return i - j` in the first
 case as well. Not sure whether that makes much of a difference.
 >
 > Actually this is what I tried. But if you do that, you end up with some
 warning claiming that the comparison routine returns something different
 from 0,1,-1!

 Can't reproduce such a warning. Who is complaining when? Why no warning
 for the other pair component? I wonder whether one would want to put some
 bigger numbers in the test case, in order to make sure that steps with
 absolute value more than one are always involved in some comparison. But
 even then I don't see this warning you mention.

 My question about the `The input must be scalar or a dictionary` exception
 being dead code (from comment:23) still stands. I just pushed a commit for
 that. If you have no objections to it, feel free to mark this as positive
 review, since I'm happy with your changes.

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