Is it possible to accomplish this using an out parameter? This would still 
be useful to me.

On Monday, January 23, 2012 2:20:50 PM UTC-5, Gustavo wrote:
>
> Right now it returns a <float>. I'd like an NumPy array, so maybe I 
> can create the NumPy array with the correct size and row/column 
> ordering and pass it as an "out parameter" to the code generator. 
>
> On Jan 23, 12:57 pm, Aaron Meurer <asmeu...@gmail.com> wrote: 
> > But what kind of object would you expect to be used for the Matrox? 
> > 
> > Aaron Meurer 
> > 
> > On Jan 22, 2012, at 11:50 PM, Gustavo <gustavo.goret...@gmail.com> 
> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Sorry for the vagueness. This is what I'd like: 
> > 
> > > import sympy 
> > > from sympy.utilities.autowrap import autowrap 
> > 
> > > x = sympy.symbol.symbols('x') 
> > > m = sympy.Matrix([x,sympy.cos(x)]) 
> > > f = autowrap(m) 
> > 
> > > CodeGenError: Fortran only supports a single or no return value. 
> > 
> > > It's possible to autowrap each element of "m" separately, but then I 
> > > might miss out on some optimization opportunities, like common 
> > > subexpression elimination. 
> > 
> > > On Jan 21, 7:51 pm, Matthew <mrock...@gmail.com> wrote: 
> > >> Hi Gustavo, 
> > 
> > >> Can you say more about what you want? I don't understand. It might be 
> > >> helpful to give an example of what you want to work. 
> > 
> > >> -Matt 
> > 
> > >> On Jan 21, 2:07 am, Gustavo <gustavo.goret...@gmail.com> wrote: 
> > 
> > >>> How can I autowrap a matrix expression without making an 
> autofunction 
> > >>> from each of the elements 
> > 
> > > -- 
> > > You received this message because you are subscribed to the Google 
> Groups "sympy" group. 
> > > To post to this group, send email to sympy@googlegroups.com. 
> > > To unsubscribe from this group, send email to 
> sympy+unsubscr...@googlegroups.com. 
> > > For more options, visit this group athttp://
> groups.google.com/group/sympy?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/mCUBg_bgcjgJ.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to