Quantcast
Channel: ASKSAGE: Sage Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 5

How to check if a symbolic expression is numerically evaluable?

$
0
0
Context: I want to evaluate a symbolic expression numerically; however sometimes this expression still depends on some symbolic parameters not yet assigned a value. Question: What is the best way to avoid "TypeError: cannot evaluate symbolic expression numerically" in such a situation? In other words, is there a function (or an equivalent construction) for if isThisSymbolicExpressionNumericallyEvaluabel(exp): n = exp.n() else: print "sorry, no"

Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images