#10604: Rewrite diagonal matrix constructor
------------------------------+---------------------------------------------
   Reporter:  rbeezer         |       Owner:  ddrake      
       Type:  defect          |      Status:  needs_review
   Priority:  minor           |   Milestone:  sage-4.6.2  
  Component:  linear algebra  |    Keywords:              
     Author:  Rob Beezer      |    Upstream:  N/A         
   Reviewer:  Dan Drake       |      Merged:              
Work_issues:                  |  
------------------------------+---------------------------------------------
Changes (by ddrake):

  * owner:  jason, was => ddrake


Comment:

 Hmm, this is weird:

 {{{
 sage: v = numpy.array([1,2,3,100000])
 sage: m = diagonal_matrix(v)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 /mnt/usb1/scratch/drake/days27/sage-4.6.1.rc1/<ipython console> in
 <module>()

 /mnt/usb1/scratch/drake/days27/sage-4.6.1.rc1/local/lib/python2.6/site-
 packages/sage/matrix/constructor.pyc in diagonal_matrix(arg0, arg1, arg2,
 sparse)
    1392         if str(entries.dtype).count('complex')==1:
    1393             ring = CDF
 -> 1394         v = [ring(x) for x in entries]
    1395     else:
    1396         raise TypeError('diagonal matrix entries are not a
 supported type (list, tuple, vector, or NumPy array)')

 TypeError: 'NoneType' object is not callable
 }}}

 Your examples seem to have all RDF entries; my example has numpy int64
 entries. Do you see what's going on here?

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