#12287: numpy array to matrix does not respect ring spesification
------------------------------+---------------------------------------------
   Reporter:  vlima           |          Owner:  jason, was   
       Type:  defect          |         Status:  new          
   Priority:  minor           |      Milestone:  sage-5.0     
  Component:  linear algebra  |       Keywords:  numpy, matrix
Work_issues:                  |       Upstream:  N/A          
   Reviewer:                  |         Author:               
     Merged:                  |   Dependencies:               
------------------------------+---------------------------------------------

Comment(by vlima):

 In sage/matrix/constructor.py line 606 (sage-4.7.2):
 {{{
     if isinstance(args[0], numpy.ndarray):
 }}}
 If this is true, then the ring argument to matrix() will be ignored
 and <numpy array>.dtype determines the ring for the matrix. F.ex:
 {{{
    elif str_dtype.count('int') == 1:
                     m = matrix(ZZ, [list(row) for row in list(num_array)])
 }}}

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