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

kwargs ~works~ for objects ~already~ #4154

Merged
merged 4 commits into from Feb 7, 2018

Conversation

karlnapf
Copy link
Member

@karlnapf karlnapf commented Feb 6, 2018

No description provided.


# 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")
Copy link
Member Author

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...

@karlnapf
Copy link
Member Author

karlnapf commented Feb 6, 2018

@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)
Copy link
Member Author

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

Copy link
Member

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.

Copy link
Member

@sorig sorig Feb 7, 2018

Choose a reason for hiding this comment

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

I think we're just using the wrong syntax. See here. Testing in #4158

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) \
Copy link
Member Author

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....

Copy link
Member Author

Choose a reason for hiding this comment

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

@karlnapf karlnapf changed the title kwargs works for objects already kwargs ~~works~~ for objects ~~already~~ Feb 6, 2018
@karlnapf karlnapf changed the title kwargs ~~works~~ for objects ~~already~~ kwargs ~works~ for objects ~already~ Feb 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants