Original ticket http://projects.scipy.org/numpy/ticket/1517 on 2010-06-22 by trac user etecman, assigned to unknown.
When opening a npz file with numpy.load, the handle to the file is not released such that the file cannot be deleted during the runtime of the script - even if all returned values are deleted.
Error message:
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'deleteme.npz'
Example:
import os
import numpy
a = numpy.array([[1, 2, 3], [4, 5, 6]])
filenameNPZ = "deleteme.npz"
numpy.savez(filenameNPZ, a = a)
npz = numpy.load(filenameNPZ)
del npz
os.remove(filenameNPZ)
Original ticket http://projects.scipy.org/numpy/ticket/1517 on 2010-06-22 by trac user etecman, assigned to unknown.
When opening a npz file with numpy.load, the handle to the file is not released such that the file cannot be deleted during the runtime of the script - even if all returned values are deleted.
Error message:
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'deleteme.npz'
Example: