Consecutive uses of HDF5File on the same file can crash your script
Created by: anjos
The following piece of code will crash the python interpreter if the del f
step is not called between two consecutive calls to HDF5File()
. This problem seems to affect only Ubuntu 10.04 LTS.
import numpy
import bob
A = numpy.array(range(4), 'int8').reshape(2,2)
f = bob.io.HDF5File('testfile1.hdf5')
f.set('my_array', A)
#del f
f = bob.io.HDF5File('testfile1.hdf5', 'r') #read only
f.read('my_integer') #reads integer
f.read('my_float') # reads float
print f.read('my_array') # reads the array
del f