brian-team/brian2 — pull request #381 by mstimberg (2014-12-16 14:44:10+00:00)
Title: Timedarray2d

This adds proper support for 2d arrays to `TimedArray`. Such arrays have to be called as `ta(t, i)`, and since they require an explicit second argument they do not have to be the same size as the `NeuronGroup` for example (you could use something like `i % 2`). The only disadvantage of this is that we cannot really do a check whether the size of the provided values array is appropriate. In the numpy code, you'll get an index error in this case, in weave it will return `nan`.

Note that this also works in Cython, but only because it uses the pure Python version automatically. Implementing a proper Cython version is trickier than I thought (#374).

From my side this should be ready to merge.