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

replace exact flag only applies when symbols > 1 #16785

Merged
merged 2 commits into from May 9, 2019
Merged

Conversation

smichr
Copy link
Member

@smichr smichr commented May 7, 2019

References to other Issues or PRs

close #16725

Brief description of what is fixed or changed

The exact flag prevents an expression with a single Wild from matching a zero but the docstring says that it should only do that if there is more than one Wild symbol in the expression.

The doc string had been updated to indicate that setting the flag explicitly will override the default behavior.

Other comments

Very interesting that the manual_subs test failed in 3.7 but not in 3.6 when exact was set to false. The docstring shows the rather convoluted expression that will be obtained from non-atomic wild expressions.

Release Notes

  • core
    • replace docstring updated to clarify use of exact flag

@sympy-bot
Copy link

sympy-bot commented May 7, 2019

Hi, I am the SymPy bot (v147). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • core
    • replace docstring updated to clarify use of exact flag (#16785 by @smichr)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5.

Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.

Click here to see the pull request description that was parsed.

<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234". See
https://github.com/blog/1506-closing-issues-via-pull-requests . Please also
write a comment on that issue linking back to this pull request once it is
open. -->

close #16725 

#### Brief description of what is fixed or changed

The exact flag prevents an expression with a single Wild from matching a zero but the docstring says that it should only do that *if there is more than one Wild symbol in the expression.*

The doc string had been updated to indicate that setting the flag explicitly will override the default behavior.

#### Other comments

Very interesting that the `manual_subs` test failed in 3.7 but not in 3.6 when exact was set to false. The docstring shows the rather convoluted expression that will be obtained from non-atomic wild expressions.

#### Release Notes

<!-- Write the release notes for this release below. See
https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more information
on how to write release notes. The bot will check your release notes
automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
- core
    - replace docstring updated to clarify use of exact flag
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@codecov
Copy link

codecov bot commented May 8, 2019

Codecov Report

Merging #16785 into master will decrease coverage by 0.003%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##            master    #16785       +/-   ##
=============================================
- Coverage   73.821%   73.818%   -0.004%     
=============================================
  Files          619       619               
  Lines       159559    159560        +1     
  Branches     37455     37457        +2     
=============================================
- Hits        117789    117784        -5     
- Misses       36304     36308        +4     
- Partials      5466      5468        +2

@oscarbenjamin
Copy link
Contributor

Looks good

@smichr smichr merged commit 7ec6804 into sympy:master May 9, 2019
@smichr smichr deleted the 16725 branch May 9, 2019 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

issues with function replace and IndexedBase in sympy 1.4
3 participants