Is it (i, j, value) instead of ((i, j), value)?