#5185: [with patch, needs work] is_zero is broken for sparse vectors
------------------------+---------------------------------------------------
 Reporter:  jhpalmieri  |        Owner:  jhpalmieri
     Type:  defect      |       Status:  new       
 Priority:  critical    |    Milestone:  sage-3.3  
Component:  misc        |   Resolution:            
 Keywords:              |  
------------------------+---------------------------------------------------
Changes (by cwitty):

  * summary:  [with patch, needs review] is_zero is broken for sparse
              vectors => [with patch, needs work] is_zero is
              broken for sparse vectors

Comment:

 Actually, if {{{__nonzero__}}} is implemented for a class, then {{{not
 self}}} is totally equivalent to {{{not self.__nonzero__()}}}, except
 faster.  (Checking to see if an object is "true" calls the
 {{{__nonzero__}}} method using an optimized C calling convention; calling
 the method directly uses a slower, Python calling convention.)

 So the change to the body of is_zero should be reverted.  (Maybe some
 comments could be added to clarify the situation.)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5185#comment:4>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to