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
kwargs ~works~ for objects ~already~ #4154
Conversation
a365110
to
0838b75
Compare
examples/meta/src/meta_api/kwargs.sg
Outdated
|
||
# The following line fails in Python because of a bool literal issue | ||
#GaussianKernel k2(log_width=14.0, lhs_equals_rhs=True) | ||
Kernel k = kernel("GaussianKernel") |
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.
floats still don't work in octave...
@lisitsyn works with cpp, python, java, octave on my machine |
@@ -22,17 +22,14 @@ | |||
# This also fails (keywords not allowed outside initialisation variables) | |||
#kernel_factory("GaussianKernel", a=glob_fun(ordinary_argument)) | |||
|
|||
# doesnt work in ruby (TODO, don't allow in meta grammar) |
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.
@sorig we will need to block this, ruby doesn't like it
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.
What does ruby say? I can disable nested global calls, but that may disable some nested calls that are actually useful.
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.
src/shogun/base/SGObject.cpp
Outdated
if (has(Tag<numeric_t>(name))) \ | ||
put(Tag<numeric_t>(name), value); \ | ||
PUT_DEFINE_CHECK_AND_CAST(int32_t) \ | ||
PUT_DEFINE_CHECK_AND_CAST(float32_t) \ |
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.
@lisitsyn since it is only octave that cannot decide between float and int, maybe some of this could be done in swig....though I don't know how that would work....
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.
No description provided.