-
Notifications
You must be signed in to change notification settings - Fork 67
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
Document pyconvert_add_rule
#125
Comments
Ah sorry I do hang out on discourse but don't necessarily see everything. I have now documented You'll need to use PythonCall from the main branch ( |
Awesome. Thanks so much! |
Sorry to trouble you again, but you could guide me as to why the following fails to convert to
|
Ah, PythonCall does not automatically convert Python objects to Julia ones when you do things like call Python functions. This differs from PyCall. So you must do one of:
Also, as the Important paragraph in the documentation for |
Thanks for the clarification. Most appreciated! |
Well, I wanted this to be an "issue", but really I have a request for wee bit of help. I asked this on discourse (https://discourse.julialang.org/t/pythoncall-equivalent-to-pycalls-pytype-mapping/77086) but found no answers.
I want to see if I can use
PythonCall
to replacePyCall
withSymPy.jl
and to do so am looking for someway to automatically convert the underlying sympy objects into julia objects (such as Py, though with a type from SymPy.) I think the right approach ispyconvert_add_rule
but can't seem to get it working. As a test case, my current use ofPyCall::pytype_mapping
to do this is basically:pytype_mapping(sympy.core.basic.Basic, Sym)
.The text was updated successfully, but these errors were encountered: