(Test) How to initialize local matrices?

I want to initialize a 2x2 matrix with type ti.f32.

If you want to create and initialize a 2x2 matrix, you can simply pass the initial values to ti.Matrix:

mat = ti.Matrix([[0.0, 0.0], [1.0, 2.0]])