title: Writing to numpy array from dictionary
body: <p>I have a dictionary of file header values (time, number of frames, year, month, etc) that I would like to write into a numpy array.  The code I have currently is as follows: </p>
  
  <pre><code>    arr=np.array([(k,)+v for k,v in fileheader.iteritems()],dtype=["a3,a,i4,i4,i4,i4,f8,i4,i4,i4,i4,i4,i4,a10,a26,a33,a235,i4,i4,i4,i4,i4,i4"])
  </code></pre>
  
  <p>But I get an error, "can only concatenate tuple (not "int") to tuple.  </p>
  
  <p>Basically, the end result needs to be arrays storing the overall file header info (which is 512 bytes) and each frame's data (header and data, 49408 bytes for each frame).  Is there an easier way to do this?</p>
  
  <p>Edit:  To clarify (for myself as well), I need to write in the data from each frame of the file to an array. I was given matlab code as a base.  Here's a rough idea of the code given to me:</p>
  
  <pre><code>data.frame=zeros([512 96])
  frame=uint8(fread(fid,[data.numbeams,512]),'uint8'))
  data.frame=frame
  </code></pre>
  
  <p>How do I translate the "frame" into python?  </p>