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
I'm sure I'm just overlooking something in the docs, so I'm sorry for the redundant question!
I have a dictionary in Python that I'd like to pass into a Julia function. But it is getting converted to type PyCall.PyDict{Pycall.Py,Pycall.Py}. I tried to explicitly convert using PyCall.convert(Dict{String, Any}, my_python_dict) but it throws:
MethodError: Cannot `convert` an object of type PythonCall.Py to an object of type String
MWE:
from juliacall import Main as jl
d = {"a" : 1}
jl.typeof(d)
# <jl PythonCall.PyDict{PythonCall.Py, PythonCall.Py}>
Just to double check, I also tried jl.typeof("a") and got String back.
Any thoughts on how to get the dictionary into a Julia Dict?