Yes, use "var()", resp. see how it is done in there. I however don't
recommend this approach, as it is messy.
Why not something like:
In [2]: Matrix(2, 2, lambda i, j: Symbol("a_%d%d" % (i, j)))
Out[2]:
⎡a₀₀ a₀₁⎤
⎢ ⎥
⎣a₁₀ a₁₁⎦
or if you want to keep track of the symbols:
In [3]: a = [Symbol("a_%d%d" % (i, j)) for i in range(2) for j in range(2)]
In [5]: Matrix(2, 2, lambda i, j: a[i*2+j])
Out[5]:
⎡a₀₀ a₀₁⎤
⎢ ⎥
⎣a₁₀ a₁₁⎦
maybe you want to create a 2D array of the symbols instead, but you
get the idea how to do it.
Yeah, that's a problem. We should improve it, so that it works the way
you proposed, e.g. beta_13_2 should work both in latex and in unicode.
Ondrej
I think this seems reasonable to me. Another option is to create a new
classmethod, that would construct what you want, e.g.
a = Matrix.construct_diagonal(<..>)
and
a = Matrix.construct_upper_triangular(<..>)
Ondrej