title: Converting dictionary with known indices to a multidimensional array
body: <p>I have a dictionary with entries labelled as <code>{(k,i): value, ...}</code>. I now want to convert this dictionary into a 2d array where the value given for an element of the array at position <code>[k,i]</code> is the value from the dictionary with label <code>(k,i)</code>. The length of the rows will not necessarily be of the same size (e.g. row <code>k = 4</code> may go up to index <code>i = 60</code> while row <code>k = 24</code> may go up to index <code>i = 31</code>). Due to the asymmetry, it is fine to make all additional entries in a particular row equal to 0 in order to have a rectangular matrix. </p>