-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Refactor selection logic for IRR #121
Conversation
Created function to store default selection logic to allow user to insert their own selection logic for more than 1 real solution
Documented addition of IRR selection logic function. The new function contains default logic for selection of IRR Values. User may enter their own function with custom logic if required.
When attempting to push changes to GitHub, tests returned a "757:89: E501 Line too long (90 > 88)" error. Line 757 was shortened in this update.
WHen attemping to commit a change, a "Line too long" error occured. Line 757 has been shortened.
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.
Looks good to me.
# default selection logic for IRR function when there are > 2 real solutions | ||
def _irr_default_selection(eirr): | ||
# check sign of all IRR solutions |
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.
# default selection logic for IRR function when there are > 2 real solutions | |
def _irr_default_selection(eirr): | |
# check sign of all IRR solutions | |
def _irr_default_selection(eirr): | |
"""Default selection logic for IRR function when there is > 1 real solution""" | |
# check sign of all IRR solutions |
Python treats triple quoted strings directly following a function/method/class definition as docstrings. These are special comments that are used to document the function/method/class.
It dosen't matter for this function (as it's private), but, for public functions/methods/classes, please follow the numpydoc style guide.
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.
Also you currently have > 2 real solutions
, this should be > 1 real solutions
Logic for selection of IRR when more than 1 real value is found was refactored into a separate function, allowing for user customisation of selection logic if required.