ModularM
Modular3y ago
5 replies
Mahmoud Abduljawad

How to store PythonObject in DynamicVector?

I'm trying the following:
let module = Python.import_module("my_module")
let dv = DynamicVector[PythonObject]()
let result = my_module.my_func()
dv.push_back(result)

And getting:
cannot bind generic !mlirtype to memory-only type 'PythonObject'


I tried different combinations, but as long the type is non-imperative type, this won't work. What is a workaround for this?
Was this page helpful?