Skip to content

substitute_function should not evaluate expression #17849

Closed
@rwst

Description

@rwst

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions