-
Notifications
You must be signed in to change notification settings - Fork 41
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
SumFunction: allow single function input #1858
Conversation
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.
I am happy - thanks Casper
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.
I don't see where the ZeroDivisionError
is thrown whilst allocationg a SumFunction
without a list of functions.
Please change that or can you explain it?
|
||
def test_error_without_function(self): | ||
SGFunction([self.f], self.sampler) | ||
with self.assertRaises((IndexError, ZeroDivisionError)): |
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.
Why do we expect ZeroDivisionError
?
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.
-SGFunction([obj_fun])
)Checklist
I have added docstrings in line with the guidance in the developer guideI have updated the relevant documentation