Opened 6 years ago

Last modified 6 years ago

#22102 needs_info enhancement

Substitutions inside piecewise functions don't work

Reported by: Ralf Stephan Owned by:
Priority: major Milestone: sage-7.5
Component: symbolics Keywords:
Cc: Merged in:
Authors: Ralf Stephan Reviewers:
Report Upstream: N/A Work issues:
Branch: u/rws/substitutions_inside_piecewise_functions_don_t_work (Commits, GitHub, GitLab) Commit: 98cab8bb643a9545058bd0eca1a0d5054bdf0a38
Dependencies: Stopgaps:

Status badges


Not implemented at the moment

sage: f = piecewise([((0,1), x^2), ([-1,0], -x)], var=x);
sage: f.subs(x=-1)
sage: f.subs(x=y)
ValueError: substituting the piecewise variable must result in real number

Change History (4)

comment:1 Changed 6 years ago by Ralf Stephan

It may be desirable to substitute inside the piece expressions only, and require the user to generate a new function for a variable change.

comment:2 Changed 6 years ago by Ralf Stephan

Branch: u/rws/substitutions_inside_piecewise_functions_don_t_work

comment:3 Changed 6 years ago by Ralf Stephan

Authors: Ralf Stephan
Commit: 98cab8bb643a9545058bd0eca1a0d5054bdf0a38
Status: newneeds_review

New commits:

98cab8b22102: remove restrictions in piecewise._subs_

comment:4 Changed 6 years ago by Ralf Stephan

Status: needs_reviewneeds_info

#21071 requires a different approach.

Note: See TracTickets for help on using tickets.