Hi everyone,

I'd like to convert a Python function that returns an array, e.g.,

def test(x, y, z):
     return [[x, y], [y, z]]

into C++ code, e.g., a function that returns a 
std::vector<std::vector<double>>. Right now, I call `test()` with SymPy 
symbols `x`, `y`, `z`, then translate every entry into C code using 
codegen, and then after that _regexp_ the function body out. Then from the 
four function bodies, I build the C++ function.

Is there a better way to do this, in particular one that works without 
regexping around the output code?

Cheers,
Nico

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/41d60169-a7e0-49f9-9ef6-0c790bf5c7d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to