Closed
Description
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