title: Python: numpy shape to coordinate
body: <p>I have a python script what adjusts coordinates of triangles towards the centre of gravity of the triangle. 
  This works just fine, however to generate a workable output (i need to write a text file wich can be imported by other software, Abaqus) i want to write a coordinate list in a text file. </p>
  
  <p>But i can't get this to work proparly.
  I think i first will need to create a list or tuple from the numpy array.
  However this doesn't work correctly.
  There's still an array per coordinate in this list.</p>
  
  <p>How can i fix this?
  The script i currently have i shown below.</p>
  
  <pre><code>newcoords = [[0.0, 0.0], [1.0, 0.0], [0.0, 1.0], [0.0, 0.0], [1.0, 1.0], [0.0, 1.0]]
  newelems = [[0, 1, 2], [3, 4, 5]]
  
  import numpy as np
  
  #define triangles
  triangles = np.array([[newcoords[e] for e in newelem] for newelem in newelems])
  
  #find centroid of each triangle
  CM = np.mean(triangles,axis=1)
  
  #find vector from each point in triangle pointing towards centroid
  point_to_CM_vectors = CM[:,np.newaxis] - triangles
  
  #calculate similar triangles 1% smaller
  new_triangle = triangles + 0.01*point_to_CM_vectors
  
  newcoord = []
  newcoord.append(list(zip(*new_triangle)))
  print 'newcoord =', newcoord
  
  #generate output
  fout = open('_PartInput3.inp','w')
  print &gt;&gt; fout, '*Node-new_triangle'
  for i,x in  enumerate(newcoord):
    print &gt;&gt; fout, i+1, ',', x[0], ',', x[1]
  fout.close()
  </code></pre>
  
  <p>The coordinate list in the output file '_PartInput3.inp' should look the following:</p>
  
  <pre><code>*Node-new_triangle
  1, 0.00333333,  0.00333333
  2, 0.99333333,  0.00333333
  3, 0.00333333,  0.99333333
  4, 0.00333333,  0.00666667
  5, 0.99333333,  0.99666667
  6, 0.00333333,  0.99666667
  </code></pre>
  
  <p>Thanks in advance for any help!</p>