title: Convert flattened 1 dimensional indices to 2 dimensional indices
body: <p>Say I have a list of lists, e.g:</p>
  <pre><code>x = [[0,1,2,3],[4,5],[6,7,8,9,10]]
  </code></pre>
  <p>And I have the 'flat' indices of the elements I wish to target, i.e, the indices of the elements I want to select from the list if it were flattened into a 1d list:</p>
  <pre><code>flattened_indices = [0,1,4,9]
  
                    # #     #         #
  flattened_list = [0,1,2,3,4,5,6,7,8,9,10]
  </code></pre>
  <p>How do I convert the 1.d. indices into 2.d. indices that would allow me to recover the elements from the original nested list? I.e. in this example:</p>
  <pre><code>2d_indices = [(0,0), (0,1), (1,0), (2,3)]
  </code></pre>