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
Allow passing of kwargs to theano.function. #2358
Conversation
SymPy Bot Summary: ✅ Passed after merging moorepants/unused-arg (8fef999) into master (0bdb41a). |
SymPy Bot Summary: ✅ Passed after merging moorepants/unused-arg (8fef999) into master (0bdb41a). |
def test_theano_function_kwargs(): | ||
import numpy as np | ||
f = theano_function([x, y, z], [x+y], dim=1, on_unused_input='ignore') | ||
assert np.linalg.norm(f([1, 2], [3, 4], [0, 0]) - np.asarray([4, 6])) < 1e-9 |
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.
So normally would this raise an error?
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.
Yes, because on_unsused_input
is not an arg for dim_handling()
.
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.
And you can't pass in more values than specified inputs for theano.function.
I need to fix my setup before I can test this. Annoyingly travis isn't set up well to test issues related to Theano. We don't install theano in the travis virtual boxes so all tests are skipped and need to be run locally. |
A variety of small fixes
SymPy Bot Summary: ✅ Passed after merging moorepants/unused-arg (6ab3bc0) into master (196fdb3). |
I think this is good to go. |
Seems fine to me. Merging. |
Allow passing of kwargs to theano.function.
@mrocklin What do you think of this change?