def to_uncertain_func(x):
if isinstance(x, UncertainFunction):<EOL><INDENT>return x<EOL><DEDENT>elif isinstance(x, CONSTANT_TYPES):<EOL><INDENT>return UncertainFunction([x] * npts)<EOL><DEDENT>raise NotUpcast("<STR_LIT>" "<STR_LIT>" % type(x))<EOL>
Transforms x into an UncertainFunction-compatible object,
unless it is already an UncertainFunction (in which case x is returned 
unchanged).

Raises an exception unless 'x' belongs to some specific classes of
objects that are known not to depend on UncertainFunction objects
(which then cannot be considered as constants).