Skip to content
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

substitute_function should not evaluate expression #17849

Closed
rwst opened this issue Feb 24, 2015 · 14 comments
Closed

substitute_function should not evaluate expression #17849

rwst opened this issue Feb 24, 2015 · 14 comments

Comments

@rwst
Copy link

rwst commented Feb 24, 2015

One expects substitute_function to not do anything except exchanging parts of expressions but

sage: ex = sin(x) + atan2(0,0,hold=True) 
sage: ex.substitute_function(sin,cos)
...
RuntimeError: arctan2_eval(): arctan2(0,0) encountered
sage: ex = sin(x) + hypergeometric([1, 1], [2], -1)
sage: ex
hypergeometric((1, 1), (2,), -1) + sin(x)
sage: ex.substitute_function(sin,cos)              
AttributeError: 'SubstituteFunction' object has no attribute 'tuple'

Depends on #17759

Component: symbolics

Author: Ralf Stephan

Branch/Commit: c8ebd30

Reviewer: Marc Mezzarobba

Issue created by migration from https://trac.sagemath.org/ticket/17849

@rwst rwst added this to the sage-6.6 milestone Feb 24, 2015
@rwst
Copy link
Author

rwst commented Feb 26, 2015

Dependencies: #17759

@rwst
Copy link
Author

rwst commented Feb 27, 2015

comment:2

Calling operator(*map(self, ex.operands()), hold=True) as a quick fix in SubstituteFunction.composition presupposes that all operators accept the keyword.

@rwst
Copy link
Author

rwst commented Mar 4, 2015

@rwst
Copy link
Author

rwst commented Mar 4, 2015

Author: Ralf Stephan

@rwst
Copy link
Author

rwst commented Mar 4, 2015

New commits:

3781eec17759: convenience class symbolic ExpressionTreeWalker(Converter)
9375510Merge branch 'develop' into t/17759/public/17759
16aa81d17759: handle hold=True and hypergeometric
d8767cdMerge branch 'public/17759' of trac.sagemath.org:sage into t/17849/substitute_function_should_not_evaluate_expression
82332bb17849: adapt SubstituteFunction; add doctest

@rwst
Copy link
Author

rwst commented Mar 4, 2015

Commit: 82332bb

@rwst
Copy link
Author

rwst commented May 25, 2015

@rwst
Copy link
Author

rwst commented May 25, 2015

@rwst rwst modified the milestones: sage-6.6, sage-6.8 May 25, 2015
@rwst
Copy link
Author

rwst commented May 25, 2015

New commits:

fa7328517759: convenience class symbolic ExpressionTreeWalker(Converter)
c8ebd30Merge branch 'u/rws/substitute_function_should_not_evaluate_expression' of trac.sagemath.org:sage into tmp3

@rwst
Copy link
Author

rwst commented May 25, 2015

@rwst
Copy link
Author

rwst commented May 25, 2015

Changed commit from 82332bb to c8ebd30

@mezzarobba
Copy link
Member

Reviewer: Marc Mezzarobba

@rwst
Copy link
Author

rwst commented May 25, 2015

comment:9

Thanks.

@vbraun
Copy link
Member

vbraun commented May 25, 2015

Changed branch from u/rws/17849 to c8ebd30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants