#4215: [with patch, needs review] Bug in creating sparse vectors using a
dictionary
---------------------+------------------------------------------------------
 Reporter:  mhansen  |       Owner:  tbd       
     Type:  defect   |      Status:  new       
 Priority:  major    |   Milestone:  sage-3.1.3
Component:  algebra  |    Keywords:            
---------------------+------------------------------------------------------
 {{{
 I suspect there is a bug in the implementation of the vector function.
 It seems that when trying to construct a sparse vector by a dictionary
 sage simply ignores the keys. for example:

 sage: v = vector({3:1.1 , 5:3.14}); v
 (1.10000000000000, 3.14000000000000)

 where one would expect the behavior to be similar to matrix:

 sage: m = matrix({(0,3):1.1 , (0,5):3.14}); m
 [0.000000000000000 0.000000000000000 0.000000000000000
 1.10000000000000 0.000000000000000  3.14000000000000]

 it seems to me that the problem is in prepare_dict (in
 free_module_element)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4215>
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