There is one in scipy, but that is not loaded by default. It might be a good place to start; I think we should use scipy more by default than we do currently.
-M. Hampton ps. in case its not obvious, here's an example: sage: import scipy sage: map(scipy.sign,range(-3,3)) [-1, -1, -1, 0, 1, 1] On Feb 4, 9:47 am, David Harvey <[EMAIL PROTECTED]> wrote: > On Feb 4, 2008, at 9:19 AM, vgermrk wrote: > > > > > I think it would be nice to have a signum-function (i.e. > > sign(x)=abs(x)/x or sign(x)=cmp(x,0) ) in sage. > > There is none, right? > > > Of course it should work on integers, floats, lists, etc. > > Yep, just noting that this has been requested before: > > http://sagetrac.org/sage_trac/ticket/777 > > david --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---