#5081: [with patch, needs review] Make numpy play nice with Sage types
----------------------------+-----------------------------------------------
 Reporter:  jason           |       Owner:  was       
     Type:  enhancement     |      Status:  new       
 Priority:  major           |   Milestone:  sage-4.1.1
Component:  linear algebra  |    Keywords:            
 Reviewer:                  |      Author:            
   Merged:                  |  
----------------------------+-----------------------------------------------

Comment(by robertwb):

 http://bugs.python.org/issue1675423 may resolve the complex case.

 As for not using the precision trick for ZZ, I was thinking that a single
 ring should map to a single dtype. A sticky issue is that once you switch
 from ints to objects, you have different overflow semantics.

 I guess numpy folks are already used to this

 {{{
 >>> import numpy
 >>> numpy.array(2**20)
 array(1048576)
 >>> numpy.array(2**20)**2
 0
 >>> numpy.array(2**40)
 array(1099511627776L, dtype=int64)
 >>> numpy.array(2**40)**2
 0
 >>> numpy.array(2**80)
 array(1208925819614629174706176L, dtype=object)
 >>> numpy.array(2**80)**2
 1461501637330902918203684832716283019655932542976L
 }}}

 We should maybe have three cases--long (sys.maxint), int64, and object. Of
 course, the former would only be for 32-bit machines.

 - Robert

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