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

Patch root_solve() of fit function Linear() #959

Merged
merged 3 commits into from
Dec 16, 2020

Conversation

rocco8773
Copy link
Member

This patch updates the root_solve() method of plasmapy.analysis.fit_function.Linear to handle the case where the slope is zero. If this scenario occurs, then there are not finite roots and (np.nan, np.nan) is returned.

@rocco8773 rocco8773 self-assigned this Dec 15, 2020
@rocco8773 rocco8773 marked this pull request as ready for review December 15, 2020 23:14
@rocco8773 rocco8773 requested a review from a team December 15, 2020 23:14
Copy link
Member

@namurphy namurphy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One slight change but otherwise looks pretty good and straightforward to me. Thanks!

plasmapy/analysis/fit_functions.py Outdated Show resolved Hide resolved
Co-authored-by: Nick Murphy <namurphy@cfa.harvard.edu>
@rocco8773
Copy link
Member Author

@namurphy This is ready to merge if you have no other comments.

@namurphy namurphy added the refactoring ♻️ Improving an implementation without adding new functionality label Dec 16, 2020
@StanczakDominik StanczakDominik merged commit f4b27b8 into PlasmaPy:master Dec 16, 2020
@rocco8773 rocco8773 deleted the patch-ffunc-Linear branch December 16, 2020 18:05
@StanczakDominik StanczakDominik added this to the 0.6.0 milestone Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring ♻️ Improving an implementation without adding new functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants