Re: [sympy] Matrix Code Generation Opinion Thread

2014-08-05 Thread James Crist
> > >>> x = MatrixSymbol('x', 3, 1) #Acts as a vector >> >>> expr = x[1,1] + sin(x[2,1]) + cos(x[3,1]) >> >>> func = autowrap(expr) >> >>> inp = np.array([1, 2, 3]) >> >>> func(inp) >> 0.9193049302252362 > > > Do you mean it should be func(*inp)? > No, I mean func(inp), where inp is a numpy/contig

Re: [sympy] Matrix Code Generation Opinion Thread

2014-08-05 Thread Aaron Meurer
On Mon, Aug 4, 2014 at 5:44 PM, Tim Lahey wrote: > I've answered your questions below. > > On 4 Aug 2014, at 18:27, James Crist wrote: > >> >> *1. Sympy Matrices are always 2 dimensional, should this be true of the >> generated code as well?* >> > > I think the generated code should reflect the or

Re: [sympy] Matrix Code Generation Opinion Thread

2014-08-05 Thread Jason Moore
Yes, the Theano bridge solves this problem in some sense, except that Theano is weak in speeding up the long scalar expression computations. Jason moorepants.info +01 530-601-9791 On Tue, Aug 5, 2014 at 7:48 AM, Matthew Rocklin wrote: > @Matthew: >> >> Thanks, I think a lot of people could re

Re: [sympy] Matrix Code Generation Opinion Thread

2014-08-05 Thread Matthew Rocklin
> > @Matthew: > > Thanks, I think a lot of people could really use this. What my main goal > is right now is to get the basework down for *evaluating* single matrices > with expressions as elements. After that I plan on working though > correlating MatrixExpr with blas/lapack functionality so that