#11334: Update numpy to 1.6.1
------------------------+---------------------------------------------------
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):
I was writing something else:
And more subtly:
{{{
sage: a=numpy.linspace(0,9,10)
sage: a
array([0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9], dtype=object)
sage: type(a[0])
<type 'float'>
sage: type(a[9])
<type 'sage.rings.integer.Integer'>
}}}
So linspace and arange deal with sage input very differently. There should
be some coercion but it is not working properly.
now for what you are asking:
{{{
sage: numpy.linspace(0.0,9.0,float(10))
array([0.000000000000000, 1.00000000000000, 2.00000000000000,
3.00000000000000, 4.00000000000000, 5.00000000000000,
6.00000000000000, 7.00000000000000, 8.00000000000000,
9.00000000000000], dtype=object)
sage: numpy.linspace(0.0,float(9),10)
array([0.000000000000000, 1.00000000000000, 2.00000000000000,
3.00000000000000, 4.00000000000000, 5.00000000000000,
6.00000000000000, 7.00000000000000, 8.00000000000000, 9.0],
dtype=object)
sage: numpy.linspace(float(0),9.0,10)
array([0.000000000000000, 1.00000000000000, 2.00000000000000,
3.00000000000000, 4.00000000000000, 5.00000000000000,
6.00000000000000, 7.00000000000000, 8.00000000000000,
9.00000000000000], dtype=object)
}}}
I know about sage/rings/real_mpfr.pyx and the others that's how I got on
thinking of coercion not working.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11334#comment:30>
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.