Hi there,
I am using fast_callable in order to pass numpy arrays to symbolic
expressions, as suggested
[here](http://ask.sagemath.org/question/8383/using-symbolic-expressions-with-numpy-arrays/)
I encountered the following behaviour:
sage: var('x')
sage: f(x) = x**2
sage: fast_callable(f)(2)
4
sage: f(x) = 0
sage: fast_callable(f)(2)
[...]
ValueError [and no message here]
sage: f(x) = 0
sage: f(x) = 0
sage: fast_callable(f, vars=[x])(2)
0
I guess this is not a bad behaviour per se (though the exception looks like
it has not been handled properly). Nevertheless, I think it would be nice
that when `f.variables()==()`, `fast_callable` simply discards the input.
It would save some testing for corner cases: if I pass `f` to a function
that expects `f(x)` with one variable, one would have to check for the
special case of a zero-defined `f`.
Any opinions?
Best,
Jesus Torrado
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.