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

Added .xreplace() to Vector and Dyadic #20446

Merged
merged 5 commits into from Jan 1, 2021
Merged

Added .xreplace() to Vector and Dyadic #20446

merged 5 commits into from Jan 1, 2021

Conversation

sidhu1012
Copy link
Contributor

References to other Issues or PRs

Fixes #20445

Brief description of what is fixed or changed

Physics Vector and Dyadic is missing core sympy methods. This PR adds .xreplace() to these classes.

Other comments

Release Notes

  • physics.vector
    • Added .xreplace() to Vector Class.
    • Added .xreplace() to Dyadic Class.

@sympy-bot
Copy link

sympy-bot commented Nov 18, 2020

Hi, I am the SymPy bot (v161). 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:

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

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://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->
Fixes #20445 

#### Brief description of what is fixed or changed
Physics Vector and Dyadic is missing core sympy methods. This PR adds .xreplace() to these classes.

#### Other comments


#### 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 -->
* physics.vector
    * Added .xreplace() to Vector Class.
    * Added .xreplace() to Dyadic Class.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@codecov
Copy link

codecov bot commented Nov 18, 2020

Codecov Report

Merging #20446 (83df99b) into master (66de4b6) will decrease coverage by 0.008%.
The diff coverage is 100.000%.

@@              Coverage Diff              @@
##            master    #20446       +/-   ##
=============================================
- Coverage   75.766%   75.757%   -0.009%     
=============================================
  Files          673       673               
  Lines       174148    174402      +254     
  Branches     41112     41202       +90     
=============================================
+ Hits        131945    132122      +177     
- Misses       36491     36562       +71     
- Partials      5712      5718        +6     

@sidhu1012
Copy link
Contributor Author

@moorepants It's ready for review.

@sidhu1012
Copy link
Contributor Author

@moorepants Shall I start working to add .simplify method, while this PR is in review?

@moorepants
Copy link
Member

@moorepants Shall I start working to add .simplify method, while this PR is in review?

I believe they already have .simplify().

@sidhu1012
Copy link
Contributor Author

I believe they already have .simplify().

What's next to be added? I'm up for it!

@moorepants
Copy link
Member

What's next to be added? I'm up for it!

If you want to work on other things, I recommend finding open issues in the issue tracker.

@sidhu1012
Copy link
Contributor Author

If you want to work on other things, I recommend finding open issues in the issue tracker.

Yes, I'm doing that. Here #18064 (comment) you said more core methods are to be added, so I asked.

@moorepants
Copy link
Member

Yes, I'm doing that. Here #18064 (comment) you said more core methods are to be added, so I asked.

I don't know others off the top of my head. You can always add everything that an expression has to make them 1-to-1 with expressions, but I'm not sure its worth it until someone presents a use case.

@sidhu1012
Copy link
Contributor Author

sidhu1012 commented Nov 23, 2020

@moorepants Please review, I have corrected the docstrings and have made them follow numpy conventions.

@sidhu1012
Copy link
Contributor Author

Closing and opening to restart tests.

@sidhu1012 sidhu1012 closed this Dec 19, 2020
@sidhu1012 sidhu1012 reopened this Dec 19, 2020
@sidhu1012
Copy link
Contributor Author

@moorepants Please Review.

@moorepants
Copy link
Member

Thanks @sidhu1012! LGTM.

@moorepants moorepants merged commit 92f31c3 into sympy:master Jan 1, 2021
@sidhu1012 sidhu1012 deleted the xrep branch January 1, 2021 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add .xreplace() method to sympy.physics.vector.Vector and Dyadic
4 participants