thanks
uncompatible types and poor error prompt really make me confused
在 Tue, 17 Mar 2009 22:19:07 +0800,Jason Grout
写道:
>
> dagss wrote:
>> On Mar 17, 10:40 am, "Guan Guofeng" wrote:
>>> that's not the key
>>> import numpy
>>> x=numpy.arange(0,1,.05)
>>> y=numpy.sin(x)
>>> still can't work
dagss wrote:
> On Mar 17, 10:40 am, "Guan Guofeng" 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:
On Mar 17, 10:40 am, "Guan Guofeng" 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 = i
that's not the key
import numpy
x=numpy.arange(0,1,.05)
y=numpy.sin(x)
still can't work
在 Tue, 17 Mar 2009 17:23:53 +0800,dagss
写道:
>
> On Mar 17, 10:09 am, peak wrote:
>> When I run below code in SageNB, it rised error:
>>
>> import numpy
>> x=numpy.arange(0,1,.05)
>> y=numpy.sin(2*pi*x)
>>
On Mar 17, 10:09 am, peak wrote:
> When I run below code in SageNB, it rised error:
>
> import numpy
> x=numpy.arange(0,1,.05)
> y=numpy.sin(2*pi*x)
>
> Traceback (click to the left for traceback)
> ...
> AttributeError: sin
>
> but the same code works well in python, how can I obtain array x & y