Closing a file after using np.load (using Spyder)
问题 I am loading a file: a= np.load('myfile.npz') and then doing things with a After a while I regenerate myfile.npz (on a remote machine). When I attempt to copy the file across (using WinSCP) from the remote machine it fails, reporting: System Error. Code: 32. The process cannot access the file because it is being used by another process. I've tried this: >>> a.fid <open file 'myfile.npz', mode 'rb' at 0x058A78B8> >>> a.fid.close() >>> a.fid <closed file 'myfile.npz', mode 'rb' at 0x058A78B8>