Go matrix (and 3d matrix) implementation