Avoid extremely long LaTeX output for arrays
mstimberg opened this issue · 0 comments
mstimberg commented
Brian 2 supports converting Quantity
objects to LaTeX, which is also used as a "rich representation" in interfaces that support them, e.g. jupyter notebooks. This is kind of a nice gimmick, but not crazily useful in general. There is a major problem with its current implementation, though: it simply passes things on to sympy
's Matrix
object, and this object always prints out the complete content. A seemingly harmless statement like:
G = NeuronGroup(10000, 'v : volt')
G.v[:]
in a jupyter notebook will then create a huge LaTeX column vector which makes MathJax work hard to render the equation and blocks the browser.