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) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---