sympy/sympy — pull request #7823 by jcrist (2014-08-04 21:42:14+00:00)
Title: [WIP] - Matrix code gen

This is the start of work on allowing `codegen` and `autowrap` to work on `Matrix` types.

TODO:
- [ ] Support for matrix output in ccode and CCodeGen
- [ ] Support for matrix output in fcode and FCodeGen
- [ ] Support for `MatrixSymbol` input in ccode and CCodeGen
- [ ] Support for `MatrixSymbol` input in fcode and FCodeGen
- [ ] Support for f2py
- [ ] Support for cython
- [ ] Tests
- [ ] Docs

The idea is that the following should *work*:

mat = Matrix([sin(x), cos(y), tan(z)])
func = autowrap(mat)
func(1, 2, 3)

`MatrixSymbol` should also be accepted as an input argument:

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)