thanks
uncompatible types and poor error prompt really make me confused
在 Tue, 17 Mar 2009 22:19:07 +0800,Jason Grout  
<jason-s...@creativetrax.com> 写道:

>
> dagss wrote:
>> On Mar 17, 10:40 am, "Guan Guofeng" <ggp...@gmail.com> wrote:
>>> that's not the key
>>> import numpy
>>> x=numpy.arange(0,1,.05)
>>> y=numpy.sin(x)
>>> still can't work
>>
>> Ahh right. NumPy is not compatible with the Sage number types. Either
>> specify "%python" at the top of the cell, or do
>>
>> sage: import numpy
>> sage: Integer = int
>> sage: RealNumber = float
>> sage: x = numpy.arange(0, 1, .05)
>> sage: y = numpy.sin(x + 2*numpy.pi)
>
>
> Or:
>
> import numpy
> x = numpy.arange(0,1,.05).astype(float)
> y=numpy.sin(x)
>
>
> >



-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to