title: How to write a dictionary with numpy array in a file
body: <p>I have a dictionary like this: `</p>
  <pre><code>d = {1: array([ 1.,  1., 0., 1.]),2: array([ 0.,  1., 0., 1.]), 3:
          array([ 1.,  0., 0., 1.]), 4: array([ 1.,  0., 1., 1.])}`
  </code></pre>
  <p>I want to write all the values:</p>
  <pre><code> ([ 1.,  1., 0., 1.], [ 0.,  1., 0., 1.], 
    [ 1.,  0., 0., 1.], [ 1.,  0., 1., 1.]) 
  </code></pre>
  <p>in a .tsv file. Each value in a column, in this example I would have 4 columns with 4 rows.</p>
  <p>This is what I want in the file:</p>
  <blockquote>
  <p>1 0 1 1</p>
  <p>1 1 0 0</p>
  <p>0 0 0 1</p>
  <p>1 1 1 1</p>
  </blockquote>
  <p>each numpy array is printed in a different column.</p>
  <p>The code that I have gives me all values in the same column:</p>
  <pre><code>f = open(&quot;Result.tsv&quot;, &quot;wb&quot;)
  for key, value in d.items():
      np.savetxt(f, value, delimiter=',')
  f.close()
  </code></pre>