title: Closing a file after using np.load (using Spyder)
body: <p>I am loading a file:</p>
  
  <pre><code>a= np.load('myfile.npz')
  </code></pre>
  
  <p>and then doing things with <code>a</code></p>
  
  <p>After a while I regenerate <code>myfile.npz</code> (on a remote machine).</p>
  
  <p>When I attempt to copy the file across (using WinSCP) from the remote machine it fails, reporting:</p>
  
  <pre><code>System Error.  Code: 32.
  The process cannot access the file because it is being used by another process.
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>&gt;&gt;&gt; a.fid
  &lt;open file 'myfile.npz', mode 'rb' at 0x058A78B8&gt;
  &gt;&gt;&gt; a.fid.close()
  &gt;&gt;&gt; a.fid
  &lt;closed file 'myfile.npz', mode 'rb' at 0x058A78B8&gt;
  </code></pre>
  
  <p>However, the file copy still fails.</p>
  
  <p>If I close the python interpreter, the copy succeeds.</p>
  
  <p>What is causing this porblem? Do I need to close <code>myfile.npz</code> (I had thought this was handled automatically) first? If so, how do I do it?</p>
  
  <p>I'm using a python console with in the Spyder IDE on Win7.</p>