# Revision history [back]

### What is a sage object?

Where can I find how to convert a lambda function to a sage object?

I would like to use the plot command with my lambda function

from numpy import sign
H=lambda x: (sign(x)+1)/2
P = lambda x, a,b: H(x - a) - H(x - b)
plot(P(x,5,10), (x,-10,20)
# or
BOX510(x) = lambda x: P(x,5,10)
plot(BOX510(x), (x,-10,20)


I get error messages. I had a glance at the documentation. It says the plot command expects a Sage Object, but unfortuntely I do not have the notion for its meaning.

### What is a sage object?

Where can How do I find how to convert a lambda function to a sage object?

I would like to use the plot command with my lambda function

from numpy import sign
H=lambda x: (sign(x)+1)/2
P = lambda x, a,b: H(x - a) - H(x - b)
plot(P(x,5,10), (x,-10,20)
# or
BOX510(x) = lambda x: P(x,5,10)
plot(BOX510(x), (x,-10,20)


I get error messages. I had a glance at the documentation. It says the plot command expects a Sage Object, but unfortuntely I do not have the notion for its meaning.

### What is a sage object?

How do I convert a lambda function to a sage object?

I would like to use the plot command with my lambda function

from numpy import sign
H=lambda x: (sign(x)+1)/2
P = lambda x, a,b: H(x - a) - H(x - b)
plot(P(x,5,10), (x,-10,20)
# or
BOX510(x) = lambda x: P(x,5,10)
plot(BOX510(x), (x,-10,20)


I get error messages. I had a glance at the documentation. It says the plot command expects a Sage Object, but unfortuntely I do not have the notion for its meaning.

Eureka, it works, when I use the sign function of sage instead of the one I imported from numpy. Yet, I would like to know what a sage object is?