Added to_list function for tt.matrix