Hallo, I am new using sage and I can say, I is great! But now I got the following problem. I use sage notebook(). I defined a function:
def h(f): if (f < 10): return 10 if (f >= 10): return 0 and now I want to plot it. G=plot(h(f), 0, 20) G.show() I get the error message: Traceback (click to the left for traceback) ... TypeError: no way to make fast_float from None So, sage has a problem with the if statement. When I set def h(f): if (f < 10): return 10 else: return 0 it plots with G=plot(h(f), 0, 20) G.show() a constant zero graph. When I call the function myself: h(8) I get 10 and everything is ok. Do you know what this is? The evaluation of the if statement seems not to work in plot(). thank you, steffi --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---