#11334: Update numpy to 1.6
------------------------+---------------------------------------------------
   Reporter:  jason     |          Owner:  tbd     
       Type:  task      |         Status:  new     
   Priority:  major     |      Milestone:  sage-4.8
  Component:  packages  |       Keywords:          
Work_issues:            |       Upstream:  N/A     
   Reviewer:            |         Author:          
     Merged:            |   Dependencies:          
------------------------+---------------------------------------------------

Comment(by fbissey):

 {{{
 sage: type(a[0])
 <type 'float'>
 sage: type(a[0:5])
 <type 'numpy.ndarray'>
 sage: type(a[2])
 <type 'float'>
 sage: type(a[3])
 <type 'float'>
 sage: type(a[4])
 <type 'float'>
 sage: type(a[5])
 <type 'sage.rings.integer.Integer'>
 }}}
 For some reason numpy.linspace return an array with sage objects rather
 than just floats. I am guessing it may be deeper than that. Numpy probably
 uses sage types rather than converting to numpy types. The types of a[0]
 to a[4] is strange, is there  a sage type for floats? I mean I tried
 numpy.linspace(0,2.0,6) and I got <type 'sage.rings.real_mpfr.RealNumber'>
 for a[0] to a[4] and <type 'sage.rings.real_mpfr.RealLiteral'> for a[5].

 Doing a cast numpy.array(a,dtype=float) returns something that will work.

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