title: Trying to save vtk files with tvtk made from NumPy arrays
body: <p>I'm trying to use tvtk (the package included with Enthought's Canopy) to turn some arrays into .vtk data that I can toss over to VisIt (mayavi complains on my OS (Mac OS X). I found what looked like the solution here (<a href="https://stackoverflow.com/questions/15749100/exporting-a-3d-numpy-to-a-vtk-file-for-viewing-in-paraview-mayavi">Exporting a 3D numpy to a VTK file for viewing in Paraview/Mayavi</a>) but I'm not recovering the output that the author of the answer does and was wondering if anyone could tell me what I'm doing wrong. So I enter the commands in the Canopy notebook,</p>
  
  <pre><code>import numpy as np
  from enthought.tvtk.api import tvtk, write_data
  
  data = np.random.random((10,10,10))
  
  grid = tvtk.ImageData(spacing=(10, 5, -10), origin=(100, 350, 200), 
                    dimensions=data.shape)
  grid.point_data.scalars = np.ravel([], order='F')
  grid.point_data.scalars.name = 'Test Data'
  
  # Writes legacy ".vtk" format if filename ends with "vtk", otherwise
  # this will write data using the newer xml-based format.
  write_data(grid, '/Users/Epictetus/Documents/Dropbox/Work/vtktest.vtk')
  </code></pre>
  
  <p>which does create a vtk file, but unlike the output the author of the previous answer suggests, I just get a blank output,</p>
  
  <pre><code># vtk DataFile Version 3.0
  vtk output
  ASCII
  DATASET STRUCTURED_POINTS
  DIMENSIONS 10 10 10
  SPACING 10 5 -10
  ORIGIN 100 350 200
  </code></pre>
  
  <p>Is it obvious what I'm doing wrong? File I/O has never been my forte...</p>
  
  <p>Cheers!</p>
  
  <p>-user2275987</p>