how to converts a flat index or array of flat indices into a tuple of coordinate arrays.
here is a example in numpy
np.unravel_index([22, 41, 37], (7,6))
(array([3, 6, 6]), array([4, 5, 1]))

can anyone help me ? thank you !