title: Using numpy to write an array to stdout
body: <p>What is an idiomatic way to write a Numpy 2D Array to stdout? e.g. I have an array </p>
  
  <pre><code>a = numpy.array([[2., 0., 0.], [0., 2., 0.], [0., 0., 4.]])
  
  [[ 2.  0.  0.]
   [ 0.  2.  0.]
   [ 0.  0.  4.]]
  </code></pre>
  
  <p>That I would like outputted as:</p>
  
  <pre><code>2.0 0.0 0.0
  0.0 2.0 0.0
  0.0 0.0 4.0
  </code></pre>
  
  <p>I can do this by converting to a nested list, and then joining the list elements:</p>
  
  <pre><code>print( '\n'.join( [ ' '.join( [ str(e) for e in row ] ) for row in a.tolist() ] ) )
  </code></pre>
  
  <p>but would like something like:</p>
  
  <pre><code>a.tofile( sys.stdout )
  </code></pre>
  
  <p>(except this gives a syntax error).</p>