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
Improve warning message of Point.vel #25708
Conversation
✅ Hi, I am the SymPy bot. 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.13. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
This is just a frequent message I get when running |
sympy/physics/vector/point.py
Outdated
warn(f"Velocity of {self.name} automatically calculated based " | ||
f"on point {candidate_neighbor[0].name} but it is also " | ||
f"possible from points(s): {str(candidate_neighbor[1:])}. " | ||
f"Velocities from these points are not necessarily the " | ||
f"same. This may cause errors in your calculations.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warn(f"Velocity of {self.name} automatically calculated based " | |
f"on point {candidate_neighbor[0].name} but it is also " | |
f"possible from points(s): {str(candidate_neighbor[1:])}. " | |
f"Velocities from these points are not necessarily the " | |
f"same. This may cause errors in your calculations.") | |
warn(filldedent(f""" | |
Velocity of {self.name} automatically calculated based | |
on point {candidate_neighbor[0].name} but it is also | |
possible from points(s): {str(candidate_neighbor[1:])}. | |
Velocities from these points are not necessarily the | |
same. This may cause errors in your calculations.""")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filldedent
can be imported from sympy.utilities.misc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint. Adjusted it accordingly in 8dd3feb.
References to other Issues or PRs
Brief description of what is fixed or changed
This PR improves the warning message of
Point.vel
.Other comments
Release Notes
Point.vel
warning message.