Gabriel Wu

Results 147 comments of Gabriel Wu

The project has been moved to [wechaty/rust-wechaty](https://github.com/wechaty/rust-wechaty).

The reason this error is triggered is that `PythonCall.jl` uses CPython's `PyObject_CallObject` to call Python functions, which passes `*args` to the callable.

Removing the check is easy, but I do not know why there are those checks and whether there will be some downsides if they are removed.

Yes, the AST part might be another obstacle. In `PythonCall.jl`, there is no AST conversion from Julia to Python, and Julia functions are pointers from Python's side.

Maybe related: https://discourse.julialang.org/t/idea-for-a-ast-frontend-for-parsing-between-julia-and-python/57963/3

> IIRC, Taichi kernels do not yet support `*args` in the parameter list. It would be nice if you could add support for it. FYI, the AST transformer handles kernel...

Can this be done by passing a Python AST object to Taichi? I can convert the Julia kernel function to Python AST at the Julia side.

The following code ran successfully @strongoier @lin-hitonami @k-ye @yuanming-hu ```julia using CondaPkg using PythonCall CondaPkg.add_pip("taichi") ti = pyimport("taichi") let ti.init(; arch=ti.gpu) n = 640 pixels = ti.Vector.field(3; dtype=pytype(1.0), shape=(n *...

I am also trying [PythonCall.pyfunc](https://cjdoris.github.io/PythonCall.jl/stable/pythoncall-reference/#PythonCall.pyfunc), but this one requires removal of the positional args check as mentioned above. **Update** I think this is very promising. I have solved the signature...

I found that in `_get_tree_and_ctx()`, the source code is just used for `ast.parse()`. Is there an equivalent function that directly takes the AST as input?