-
-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parent of argument lost with Functions #20312
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
@jdemeyer: I really would appreciate any input you can give me here. If it is not possible to decide which argument of the function determines the return type, a small database of functions with more than one argument could be used that contains that information. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:6
It looks like the first version here can handle the binomial example of #20060 as well as the symbolic poly functions. It works by adding a field This does not work however with the title example because there the functions are nested. Since it seems we cannot decide where in a nested expression the specific element is whose parent we want to preserve I tend to exclude the nested case. New commits:
|
Author: Ralf Stephan |
Commit: |
comment:7
Tests pass. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Volker Braun |
Changed branch from u/rws/parent_of_argument_lost_with_functions to |
Some Python objects as function arguments lose their parent, i.e. the code in the specific function can no longer access it because the object was coerced into SR. This can result in violation of the rule that function input and output should be of the same type.
The specific function (here sin) code cannot remedy this because there the damage is already done. The problem is in
symbolic/function.pyx:BuiltinFunction.__call__
where the parent of function arguments is lost.See also #18832 and maybe #17790.
CC: @jdemeyer
Component: symbolics
Author: Ralf Stephan
Branch/Commit:
58f3d00
Reviewer: Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/20312
The text was updated successfully, but these errors were encountered: