D0SBoots D0SBoots - 1 month ago 10
Python Question

Does NumPy have an inverse of unravel_index()?

numpy.unravel_index() takes a shape and a flat index into an array, and returns the tuple that represents that index in the array. Is there an inverse? I can compute it by hand, but this seems like it must be a built-in function somewhere...

Answer
Comments