>
>
> Or I don't understand your problem [about the problem with calling for arg
> in the new assumptions handler]
>
The problem is that arg is written using old assumptions, so unless you
rewrite arg to use the new assumptions and pass assumptions along to it,
you won't get the benefit of its computations. Here's a trivial example
using foo instead of arg but hopefully the point comes across:
def foo(e):
if e.is_positive: return True
return False
Say that in a NEW handler you want to try
...
if foo(e): return 1
else: return 2
...
You will always get 2 if e is a symbol because when you call, say,
ask(Q.Bar(x), Q.positive(x))
x has no direct assumption so False will be returned from foo and thus 2
will result from the ask. So unless we either 1) assign assumptions to
symbols (but that will not be sufficient to handle things like Q.positive(x
+ 2) or 2) start passing assumptions to all functions which have a
dependence on assumptions (so something like def foo(e) -> def foo(e,
assumptions={})) I don't know how we are going to get the
old-assumptions-API-based functions to start working with the new
assumptions. What am I missing? How will foo above need to be modified so
it works?
--
You received this message because you are subscribed to the Google Groups
"sympy" 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/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/e664b892-c9e9-4cbf-b5be-0d6b6c123615%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.