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

simplify method of DiracDelta is deprecated #12859

Closed
asmeurer opened this issue Jul 2, 2017 · 1 comment · Fixed by #22952
Closed

simplify method of DiracDelta is deprecated #12859

asmeurer opened this issue Jul 2, 2017 · 1 comment · Fixed by #22952
Labels
Deprecation Removal Tracks the removal of a deprecated feature. See github.com/sympy/sympy/wiki/Deprecating-policy

Comments

@asmeurer
Copy link
Member

asmeurer commented Jul 2, 2017

The simplify method of DiracDelta is deprecated. Use expand(diracdelta=True, wrt=x) instead.

This was done because the simplify method on other objects has a different API (no wrt flag), which was causing issues (e.g., #7716).

@asmeurer asmeurer added the Deprecation Removal Tracks the removal of a deprecated feature. See github.com/sympy/sympy/wiki/Deprecating-policy label Jul 2, 2017
@mph-
Copy link

mph- commented Jan 4, 2019

Instead of deprecating this method, I recommend having a default None value for the variable x. The expand method would be called if x is not None and self returned otherwise.

This would fix DiracDelta('t').is_constant(), and similar operations relying on the simplify method, which currently fails.

It would also make the API consistent since (3 * DiracDelta('t')).simplify() does what is expected but DiracDelta('t').simplify() fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecation Removal Tracks the removal of a deprecated feature. See github.com/sympy/sympy/wiki/Deprecating-policy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants