Ticket #2933 (closed defect: fixed)
[with patch, with positive review] calculus -- substitution of a dict for SymbolicFunctionEvaluation is broken (but **kwds works)
| Reported by: | was | Owned by: | mhansen |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.0 |
| Component: | calculus | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
Substitution with a dictionary as input is broken. Notice below in the third input that the dictionary is ignored?!
sage: function('f',x)
f(x)
sage: (f(x)).substitute(f=log)
log(x)
sage: (f(x)).substitute({f:log})
f(x)
sage: type(f(x))
<class 'sage.calculus.calculus.SymbolicFunctionEvaluation'>
sage: (x^3 + 1).substitute(x=5)
126
sage: (x^3 + 1).substitute({x:5})
126
Attachments
Change History
comment:1 Changed 5 years ago by mhansen
- Owner changed from was to mhansen
- Status changed from new to assigned
- Summary changed from calculus -- substitution of a dict for SymbolicFunctionEvaluation is broken (but **kwds works) to [with patch, needs review] calculus -- substitution of a dict for SymbolicFunctionEvaluation is broken (but **kwds works)
comment:2 Changed 5 years ago by ncalexan
- Summary changed from [with patch, needs review] calculus -- substitution of a dict for SymbolicFunctionEvaluation is broken (but **kwds works) to [with patch, with positive review] calculus -- substitution of a dict for SymbolicFunctionEvaluation is broken (but **kwds works)
I find the business with isinstance(str) strange, but it looks right and the doctests assert the correct behaviour.
Note: See
TracTickets for help on using
tickets.

