Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yeah, and the same thing happens with plot(h,(x,-10,10)). That is not good - I'm sure we just never had this case show up before.

The exception arises in sage.symbolic.expression_conversions.FastFloatConverter.symbol:

        try:
            return self.ff.fast_float_constant(float(ex))
        except TypeError:
            raise ValueError, "free variable: %s" % repr(ex)

so that it assumes if a callable expression doesn't have the variable, it must be a constant. However, it before this asks for if name in vars and if name in svars, but here the name is 'x |--> x'.

So what we need to do is fix it so that if the operator is None in the previous traceback in your error message, we check for this case explicitly, where the name isn't just one of the variables.

This is now Ticket 10246 .

Yeah, and the same thing happens with plot(h,(x,-10,10)). That is not good - I'm sure we just never had this case show up before.

The exception arises in sage.symbolic.expression_conversions.FastFloatConverter.symbol:

        try:
            return self.ff.fast_float_constant(float(ex))
        except TypeError:
            raise ValueError, "free variable: %s" % repr(ex)

so that it assumes if a callable expression doesn't have the variable, it must be a constant. However, it before this asks for if name in vars and if name in svars, but here the name is 'x |--> x'.

So what we need to do is fix it so that if the operator is None in the previous traceback in your error message, we check for this case explicitly, where the name isn't just one of the variables.

This is now Ticket 10246 .


Edit: this also came up at this question. I have a fix, but I can't log on to Trac.

Yeah, and the same thing happens with plot(h,(x,-10,10)). That is not good - I'm sure we just never had this case show up before.

The exception arises in sage.symbolic.expression_conversions.FastFloatConverter.symbol:

        try:
            return self.ff.fast_float_constant(float(ex))
        except TypeError:
            raise ValueError, "free variable: %s" % repr(ex)

so that it assumes if a callable expression doesn't have the variable, it must be a constant. However, it before this asks for if name in vars and if name in svars, but here the name is 'x |--> x'.

So what we need to do is fix it so that if the operator is None in the previous traceback in your error message, we check for this case explicitly, where the name isn't just one of the variables.

This is now Ticket 10246 .


Edit: this also came up Patch at this questionTrac 10246. I have a fix, but I can't log on to Trac.

is now ready for review.