sympy/sympy — pull request #2013 by mrocklin (2013-04-14 16:45:18+00:00)
Title: Print SymPy Matrix to Theano

Depends on https://github.com/Theano/Theano/pull/1335

```Python
In [1]: t = Symbol('theta')

In [2]: X = Matrix([[cos(t), -sin(t)],
[sin(t), cos(t)]])

In [3]: X
Out[3]:
⎡cos(θ) -sin(θ)⎤
⎢ ⎥
⎣sin(θ) cos(θ) ⎦

In [4]: from sympy.printing.theanocode import *

In [5]: f = theano_function([t], [X])

In [6]: f(3.14)
Out[6]:
[[-0.99999875 -0.00159255]
[ 0.00159255 -0.99999875]]
```