You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot compile example from tutorial in VS2015 because of named argument #543
I'm trying to run the first c# example from tutorial, but it looks like my VS2015 doesn't recognize named arguments for for dynamic objects.
Looks like it is the problem of environment, but its resolution will also be useful for other users.
Screenshots
code snippet with compile error:
console output with another issue (possibly related), where dtype of numpy array is printed as "object" instead of "int", printing an array also results in "object":
For this syntax to work you need to use pythonnet from the master. Note that we are planning to adopt slightly different syntax for calling into numpy arrays:
I installed managed assembly via nuget as described in "installation" section of wiki. So what do you mean by "to use pythonnet from the master"?
It looks like named arguments for methods of dynamic objects violate c# syntax (I have never used them before in such manner).
I installed pythonnet with given cmd params. But the problem still exists. Are you sure that c# cyntax isn't violated with named params for dynamics? Or maybe problem is with VS version or resharper?
Activity
den-run-ai commentedon Sep 15, 2017
For this syntax to work you need to use pythonnet from the master. Note that we are planning to adopt slightly different syntax for calling into numpy arrays:
#514
atm84a commentedon Sep 15, 2017
I installed managed assembly via nuget as described in "installation" section of wiki. So what do you mean by "to use pythonnet from the master"?
It looks like named arguments for methods of dynamic objects violate c# syntax (I have never used them before in such manner).
den-run-ai commentedon Sep 15, 2017
https://github.com/pythonnet/pythonnet/wiki/Installation
pip install git+https://github.com/pythonnet/pythonnetatm84a commentedon Sep 15, 2017
I installed pythonnet with given cmd params. But the problem still exists. Are you sure that c# cyntax isn't violated with named params for dynamics? Or maybe problem is with VS version or resharper?
den-run-ai commentedon Sep 15, 2017
@UNdedss that is my bad! The syntax on C# side for keyword arguments is colon sign
:, not equal sign=, unlike Python:https://github.com/pythonnet/pythonnet/blob/master/src/embed_tests/TestNamedArguments.cs
I fixed this in readme now:
4bac694
More details about this feature in this pull request:
#461
den-run-ai commentedon Dec 14, 2017
This looks fixed, so I'm closing this issue.