#13386: comparison of Sage integer with Numpy integer
----------------------------------------------+-----------------------------
       Reporter:  vdelecroix                  |         Owner:  vdelecroix
           Type:  defect                      |        Status:  needs_info
       Priority:  major                       |     Milestone:  sage-5.7  
      Component:  basic arithmetic            |    Resolution:            
       Keywords:  integer, numpy, comparison  |   Work issues:            
Report Upstream:  N/A                         |     Reviewers:            
        Authors:  Vincent Delecroix           |     Merged in:            
   Dependencies:  #11714                      |      Stopgaps:            
----------------------------------------------+-----------------------------

Comment (by whuss):

 I just added a patch, which avoids the loading of numpy during startup.

 Unfortunately comparison with numpy types fail for all rings:


 {{{
 sage: import numpy
 sage: QQ(1) == numpy.int32(1)
 False
 sage: QQbar(1) == numpy.int32(1)
 False
 sage: AA(1) == numpy.int32(1)
 False
 sage: RR(1) == numpy.int32(1)
 False
 sage: RDF(1) == numpy.int32(1)
 False
 sage: import numpy
 sage: QQ(1) == numpy.int32(1)
 False
 sage: QQbar(1) == numpy.int32(1)
 False
 sage: AA(1) == numpy.int32(1)
 False
 sage: RR(1) == numpy.int32(1)
 False
 sage: RDF(1) == numpy.int32(1)
 False
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13386#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].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to